@platform-modules/foreign-ministry 1.3.198 → 1.3.200
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/data-source.js +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/models/ConversationsV2Model.d.ts +2 -0
- package/dist/models/ConversationsV2Model.js +10 -0
- package/dist/models/DocumentationFileModel.d.ts +9 -0
- package/dist/models/DocumentationFileModel.js +49 -0
- package/dist/models/DocumentationFolderModel.d.ts +8 -0
- package/dist/models/DocumentationFolderModel.js +44 -0
- package/dist/models/MessagesV2Model.d.ts +3 -1
- package/dist/models/MessagesV2Model.js +5 -0
- package/dist/models/PollOptionsModel.d.ts +10 -0
- package/dist/models/PollOptionsModel.js +45 -0
- package/dist/models/PollVotesModel.d.ts +13 -0
- package/dist/models/PollVotesModel.js +58 -0
- package/dist/models/PollsModel.d.ts +17 -0
- package/dist/models/PollsModel.js +74 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -0
- package/src/index.ts +6 -1
- package/src/models/ConversationsV2Model.ts +8 -0
- package/src/models/DocumentationFileModel.ts +35 -0
- package/src/models/DocumentationFolderModel.ts +25 -0
- package/src/models/MessagesV2Model.ts +5 -1
- package/src/models/PollOptionsModel.ts +26 -0
- package/src/models/PollVotesModel.ts +37 -0
- package/src/models/PollsModel.ts +49 -0
- package/src/models/ProjectMilestoneDocumentsModel.ts +40 -40
- package/src/models/ProjectMilestonesModel.ts +65 -65
- package/src/models/ProjectTaskActivityModel.ts +35 -35
- package/src/models/ProjectTaskCommentsModel.ts +17 -17
- package/src/models/ProjectTasksModel.ts +80 -80
package/dist/data-source.js
CHANGED
|
@@ -46,6 +46,9 @@ const ConversationsV2Model_1 = require("./models/ConversationsV2Model");
|
|
|
46
46
|
const ConversationParticipantsV2Model_1 = require("./models/ConversationParticipantsV2Model");
|
|
47
47
|
const MessagesV2Model_1 = require("./models/MessagesV2Model");
|
|
48
48
|
const MessageReadStatusModel_1 = require("./models/MessageReadStatusModel");
|
|
49
|
+
const PollsModel_1 = require("./models/PollsModel");
|
|
50
|
+
const PollOptionsModel_1 = require("./models/PollOptionsModel");
|
|
51
|
+
const PollVotesModel_1 = require("./models/PollVotesModel");
|
|
49
52
|
const ShifttimesModel_1 = require("./models/ShifttimesModel");
|
|
50
53
|
const AttendanceModel_1 = require("./models/AttendanceModel");
|
|
51
54
|
const UserShiftModel_1 = require("./models/UserShiftModel");
|
|
@@ -198,6 +201,8 @@ const ProjectMilestoneDocumentsModel_1 = require("./models/ProjectMilestoneDocum
|
|
|
198
201
|
const ProjectTasksModel_1 = require("./models/ProjectTasksModel");
|
|
199
202
|
const ProjectTaskActivityModel_1 = require("./models/ProjectTaskActivityModel");
|
|
200
203
|
const ProjectTaskCommentsModel_1 = require("./models/ProjectTaskCommentsModel");
|
|
204
|
+
const DocumentationFolderModel_1 = require("./models/DocumentationFolderModel");
|
|
205
|
+
const DocumentationFileModel_1 = require("./models/DocumentationFileModel");
|
|
201
206
|
const UniversalLanguageMasterModel_1 = require("./models/UniversalLanguageMasterModel");
|
|
202
207
|
const MeetingAppointmentReminderLogModel_1 = require("./models/MeetingAppointmentReminderLogModel");
|
|
203
208
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
@@ -251,6 +256,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
251
256
|
ConversationParticipantsV2Model_1.ConversationParticipantsV2,
|
|
252
257
|
MessagesV2Model_1.MessagesV2,
|
|
253
258
|
MessageReadStatusModel_1.MessageReadStatus,
|
|
259
|
+
PollsModel_1.Poll,
|
|
260
|
+
PollOptionsModel_1.PollOption,
|
|
261
|
+
PollVotesModel_1.PollVote,
|
|
254
262
|
ShifttimesModel_1.ShiftDetails,
|
|
255
263
|
AttendanceModel_1.AttendanceDetails,
|
|
256
264
|
UserShiftModel_1.UserShift,
|
|
@@ -403,6 +411,8 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
403
411
|
ProjectTasksModel_1.ProjectTasks,
|
|
404
412
|
ProjectTaskActivityModel_1.ProjectTaskActivity,
|
|
405
413
|
ProjectTaskCommentsModel_1.ProjectTaskComments,
|
|
414
|
+
DocumentationFolderModel_1.DocumentationFolder,
|
|
415
|
+
DocumentationFileModel_1.DocumentationFile,
|
|
406
416
|
UniversalLanguageMasterModel_1.UniversalLanguageMaster,
|
|
407
417
|
MeetingAppointmentReminderLogModel_1.MeetingAppointmentReminderLog
|
|
408
418
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,9 @@ export * from './models/ConversationsV2Model';
|
|
|
26
26
|
export * from './models/ConversationParticipantsV2Model';
|
|
27
27
|
export * from './models/MessagesV2Model';
|
|
28
28
|
export * from './models/MessageReadStatusModel';
|
|
29
|
+
export * from './models/PollsModel';
|
|
30
|
+
export * from './models/PollOptionsModel';
|
|
31
|
+
export * from './models/PollVotesModel';
|
|
29
32
|
export * from './models/FMServices';
|
|
30
33
|
export * from './models/FMSubservices';
|
|
31
34
|
export * from './models/serviceBookmarksModel';
|
|
@@ -303,6 +306,8 @@ export * from './models/ProjectMilestoneDocumentsModel';
|
|
|
303
306
|
export * from './models/ProjectTasksModel';
|
|
304
307
|
export * from './models/ProjectTaskActivityModel';
|
|
305
308
|
export * from './models/ProjectTaskCommentsModel';
|
|
309
|
+
export * from './models/DocumentationFolderModel';
|
|
310
|
+
export * from './models/DocumentationFileModel';
|
|
306
311
|
export * from './models/EmployeeMilestonesModel';
|
|
307
312
|
export * from './models/EmployeeMilestoneDetailsModel';
|
|
308
313
|
export * from './models/MissionTravelPassportExpiryNotificationConfigModel';
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,9 @@ __exportStar(require("./models/ConversationsV2Model"), exports);
|
|
|
43
43
|
__exportStar(require("./models/ConversationParticipantsV2Model"), exports);
|
|
44
44
|
__exportStar(require("./models/MessagesV2Model"), exports);
|
|
45
45
|
__exportStar(require("./models/MessageReadStatusModel"), exports);
|
|
46
|
+
__exportStar(require("./models/PollsModel"), exports);
|
|
47
|
+
__exportStar(require("./models/PollOptionsModel"), exports);
|
|
48
|
+
__exportStar(require("./models/PollVotesModel"), exports);
|
|
46
49
|
__exportStar(require("./models/FMServices"), exports);
|
|
47
50
|
__exportStar(require("./models/FMSubservices"), exports);
|
|
48
51
|
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
@@ -376,6 +379,8 @@ __exportStar(require("./models/ProjectMilestoneDocumentsModel"), exports);
|
|
|
376
379
|
__exportStar(require("./models/ProjectTasksModel"), exports);
|
|
377
380
|
__exportStar(require("./models/ProjectTaskActivityModel"), exports);
|
|
378
381
|
__exportStar(require("./models/ProjectTaskCommentsModel"), exports);
|
|
382
|
+
__exportStar(require("./models/DocumentationFolderModel"), exports);
|
|
383
|
+
__exportStar(require("./models/DocumentationFileModel"), exports);
|
|
379
384
|
// Employee Milestones Models
|
|
380
385
|
__exportStar(require("./models/EmployeeMilestonesModel"), exports);
|
|
381
386
|
__exportStar(require("./models/EmployeeMilestoneDetailsModel"), exports);
|
|
@@ -9,6 +9,8 @@ export declare class ConversationsV2 extends BaseModel {
|
|
|
9
9
|
conversation_type: ConversationTypeV2;
|
|
10
10
|
conversation_name?: string;
|
|
11
11
|
meeting_id?: number | null;
|
|
12
|
+
appointment_id?: number | null;
|
|
13
|
+
project_id?: number | null;
|
|
12
14
|
last_message_at: Date;
|
|
13
15
|
participants?: ConversationParticipantsV2[];
|
|
14
16
|
messages?: MessagesV2[];
|
|
@@ -24,6 +24,8 @@ let ConversationsV2 = class ConversationsV2 extends BaseModel_1.BaseModel {
|
|
|
24
24
|
super();
|
|
25
25
|
this.conversation_type = ConversationTypeV2.DIRECT;
|
|
26
26
|
this.meeting_id = null;
|
|
27
|
+
this.appointment_id = null;
|
|
28
|
+
this.project_id = null;
|
|
27
29
|
this.last_message_at = new Date();
|
|
28
30
|
}
|
|
29
31
|
};
|
|
@@ -44,6 +46,14 @@ __decorate([
|
|
|
44
46
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
45
47
|
__metadata("design:type", Object)
|
|
46
48
|
], ConversationsV2.prototype, "meeting_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], ConversationsV2.prototype, "appointment_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], ConversationsV2.prototype, "project_id", void 0);
|
|
47
57
|
__decorate([
|
|
48
58
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
49
59
|
__metadata("design:type", Date)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class DocumentationFile extends BaseModel {
|
|
3
|
+
folder_id: number;
|
|
4
|
+
file_path: string;
|
|
5
|
+
filename: string;
|
|
6
|
+
filesize: number;
|
|
7
|
+
filetype: string;
|
|
8
|
+
constructor(folder_id?: number, file_path?: string, filename?: string, filesize?: number, filetype?: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.DocumentationFile = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let DocumentationFile = class DocumentationFile extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(folder_id, file_path, filename, filesize, filetype) {
|
|
17
|
+
super();
|
|
18
|
+
this.folder_id = folder_id ?? 0;
|
|
19
|
+
this.file_path = file_path ?? '';
|
|
20
|
+
this.filename = filename ?? '';
|
|
21
|
+
this.filesize = filesize ?? 0;
|
|
22
|
+
this.filetype = filetype ?? '';
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.DocumentationFile = DocumentationFile;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], DocumentationFile.prototype, "folder_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], DocumentationFile.prototype, "file_path", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], DocumentationFile.prototype, "filename", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], DocumentationFile.prototype, "filesize", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], DocumentationFile.prototype, "filetype", void 0);
|
|
46
|
+
exports.DocumentationFile = DocumentationFile = __decorate([
|
|
47
|
+
(0, typeorm_1.Entity)({ name: 'documentation_files' }),
|
|
48
|
+
__metadata("design:paramtypes", [Number, String, String, Number, String])
|
|
49
|
+
], DocumentationFile);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class DocumentationFolder extends BaseModel {
|
|
3
|
+
project_id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
parent_folder_id: number | null;
|
|
6
|
+
description: string;
|
|
7
|
+
constructor(project_id?: number, name?: string, parent_folder_id?: number | null, description?: string);
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.DocumentationFolder = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let DocumentationFolder = class DocumentationFolder extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(project_id, name, parent_folder_id, description) {
|
|
17
|
+
super();
|
|
18
|
+
this.project_id = project_id ?? 0;
|
|
19
|
+
this.name = name ?? '';
|
|
20
|
+
this.parent_folder_id = parent_folder_id ?? null;
|
|
21
|
+
this.description = description ?? '';
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.DocumentationFolder = DocumentationFolder;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], DocumentationFolder.prototype, "project_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], DocumentationFolder.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], DocumentationFolder.prototype, "parent_folder_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DocumentationFolder.prototype, "description", void 0);
|
|
41
|
+
exports.DocumentationFolder = DocumentationFolder = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'documentation_folders' }),
|
|
43
|
+
__metadata("design:paramtypes", [Number, String, Object, String])
|
|
44
|
+
], DocumentationFolder);
|
|
@@ -6,7 +6,8 @@ export declare enum MessageTypeV2 {
|
|
|
6
6
|
TEXT = "text",
|
|
7
7
|
IMAGE = "image",
|
|
8
8
|
FILE = "file",
|
|
9
|
-
VIDEO = "video"
|
|
9
|
+
VIDEO = "video",
|
|
10
|
+
POLL = "poll"
|
|
10
11
|
}
|
|
11
12
|
export declare class MessagesV2 extends BaseModel {
|
|
12
13
|
conversation_id: number;
|
|
@@ -16,6 +17,7 @@ export declare class MessagesV2 extends BaseModel {
|
|
|
16
17
|
attachment_url?: string;
|
|
17
18
|
attachment_name?: string;
|
|
18
19
|
reply_to_message_id?: number;
|
|
20
|
+
reference_id?: number;
|
|
19
21
|
conversation?: ConversationsV2;
|
|
20
22
|
sender?: User;
|
|
21
23
|
replyToMessage?: MessagesV2;
|
|
@@ -21,6 +21,7 @@ var MessageTypeV2;
|
|
|
21
21
|
MessageTypeV2["IMAGE"] = "image";
|
|
22
22
|
MessageTypeV2["FILE"] = "file";
|
|
23
23
|
MessageTypeV2["VIDEO"] = "video";
|
|
24
|
+
MessageTypeV2["POLL"] = "poll";
|
|
24
25
|
})(MessageTypeV2 || (exports.MessageTypeV2 = MessageTypeV2 = {}));
|
|
25
26
|
let MessagesV2 = class MessagesV2 extends BaseModel_1.BaseModel {
|
|
26
27
|
constructor() {
|
|
@@ -64,6 +65,10 @@ __decorate([
|
|
|
64
65
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
66
|
__metadata("design:type", Number)
|
|
66
67
|
], MessagesV2.prototype, "reply_to_message_id", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], MessagesV2.prototype, "reference_id", void 0);
|
|
67
72
|
__decorate([
|
|
68
73
|
(0, typeorm_1.ManyToOne)(() => ConversationsV2Model_1.ConversationsV2, conversation => conversation.messages),
|
|
69
74
|
(0, typeorm_1.JoinColumn)({ name: 'conversation_id' }),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { Poll } from "./PollsModel";
|
|
3
|
+
import { PollVote } from "./PollVotesModel";
|
|
4
|
+
export declare class PollOption extends BaseModel {
|
|
5
|
+
poll_id: number;
|
|
6
|
+
option_text: string;
|
|
7
|
+
poll?: Poll;
|
|
8
|
+
votes?: PollVote[];
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.PollOption = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const PollsModel_1 = require("./PollsModel");
|
|
16
|
+
const PollVotesModel_1 = require("./PollVotesModel");
|
|
17
|
+
let PollOption = class PollOption extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.poll_id = 0;
|
|
21
|
+
this.option_text = "";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.PollOption = PollOption;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], PollOption.prototype, "poll_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], PollOption.prototype, "option_text", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(() => PollsModel_1.Poll, (poll) => poll.options, { nullable: false }),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "poll_id" }),
|
|
36
|
+
__metadata("design:type", PollsModel_1.Poll)
|
|
37
|
+
], PollOption.prototype, "poll", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.OneToMany)(() => PollVotesModel_1.PollVote, (vote) => vote.option),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], PollOption.prototype, "votes", void 0);
|
|
42
|
+
exports.PollOption = PollOption = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: "poll_options" }),
|
|
44
|
+
__metadata("design:paramtypes", [])
|
|
45
|
+
], PollOption);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { Poll } from "./PollsModel";
|
|
3
|
+
import { PollOption } from "./PollOptionsModel";
|
|
4
|
+
import { User } from "./user";
|
|
5
|
+
export declare class PollVote extends BaseModel {
|
|
6
|
+
poll_id: number;
|
|
7
|
+
option_id: number;
|
|
8
|
+
user_id: number;
|
|
9
|
+
poll?: Poll;
|
|
10
|
+
option?: PollOption;
|
|
11
|
+
user?: User;
|
|
12
|
+
constructor();
|
|
13
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.PollVote = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const PollsModel_1 = require("./PollsModel");
|
|
16
|
+
const PollOptionsModel_1 = require("./PollOptionsModel");
|
|
17
|
+
const user_1 = require("./user");
|
|
18
|
+
let PollVote = class PollVote extends BaseModel_1.BaseModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.poll_id = 0;
|
|
22
|
+
this.option_id = 0;
|
|
23
|
+
this.user_id = 0;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.PollVote = PollVote;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PollVote.prototype, "poll_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], PollVote.prototype, "option_id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], PollVote.prototype, "user_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.ManyToOne)(() => PollsModel_1.Poll, (poll) => poll.votes, { nullable: false }),
|
|
41
|
+
(0, typeorm_1.JoinColumn)({ name: "poll_id" }),
|
|
42
|
+
__metadata("design:type", PollsModel_1.Poll)
|
|
43
|
+
], PollVote.prototype, "poll", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.ManyToOne)(() => PollOptionsModel_1.PollOption, (option) => option.votes, { nullable: false }),
|
|
46
|
+
(0, typeorm_1.JoinColumn)({ name: "option_id" }),
|
|
47
|
+
__metadata("design:type", PollOptionsModel_1.PollOption)
|
|
48
|
+
], PollVote.prototype, "option", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User, { nullable: false }),
|
|
51
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id" }),
|
|
52
|
+
__metadata("design:type", user_1.User)
|
|
53
|
+
], PollVote.prototype, "user", void 0);
|
|
54
|
+
exports.PollVote = PollVote = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)({ name: "poll_votes" }),
|
|
56
|
+
(0, typeorm_1.Index)("uq_poll_option_user", ["poll_id", "option_id", "user_id"], { unique: true }),
|
|
57
|
+
__metadata("design:paramtypes", [])
|
|
58
|
+
], PollVote);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { ConversationsV2 } from "./ConversationsV2Model";
|
|
3
|
+
import { PollOption } from "./PollOptionsModel";
|
|
4
|
+
import { PollVote } from "./PollVotesModel";
|
|
5
|
+
export declare class Poll extends BaseModel {
|
|
6
|
+
group_id: number;
|
|
7
|
+
meeting_id?: number | null;
|
|
8
|
+
conversation_id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
question: string;
|
|
11
|
+
expires_at?: Date | null;
|
|
12
|
+
allow_multiple: boolean;
|
|
13
|
+
conversation?: ConversationsV2;
|
|
14
|
+
options?: PollOption[];
|
|
15
|
+
votes?: PollVote[];
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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.Poll = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationsV2Model_1 = require("./ConversationsV2Model");
|
|
16
|
+
const PollOptionsModel_1 = require("./PollOptionsModel");
|
|
17
|
+
const PollVotesModel_1 = require("./PollVotesModel");
|
|
18
|
+
let Poll = class Poll extends BaseModel_1.BaseModel {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.group_id = 0;
|
|
22
|
+
this.meeting_id = null;
|
|
23
|
+
this.conversation_id = 0;
|
|
24
|
+
this.title = "";
|
|
25
|
+
this.question = "";
|
|
26
|
+
this.allow_multiple = false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.Poll = Poll;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], Poll.prototype, "group_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], Poll.prototype, "meeting_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], Poll.prototype, "conversation_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Poll.prototype, "title", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Poll.prototype, "question", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], Poll.prototype, "expires_at", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], Poll.prototype, "allow_multiple", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.ManyToOne)(() => ConversationsV2Model_1.ConversationsV2, { nullable: false }),
|
|
60
|
+
(0, typeorm_1.JoinColumn)({ name: "conversation_id" }),
|
|
61
|
+
__metadata("design:type", ConversationsV2Model_1.ConversationsV2)
|
|
62
|
+
], Poll.prototype, "conversation", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.OneToMany)(() => PollOptionsModel_1.PollOption, (option) => option.poll),
|
|
65
|
+
__metadata("design:type", Array)
|
|
66
|
+
], Poll.prototype, "options", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.OneToMany)(() => PollVotesModel_1.PollVote, (vote) => vote.poll),
|
|
69
|
+
__metadata("design:type", Array)
|
|
70
|
+
], Poll.prototype, "votes", void 0);
|
|
71
|
+
exports.Poll = Poll = __decorate([
|
|
72
|
+
(0, typeorm_1.Entity)({ name: "poll" }),
|
|
73
|
+
__metadata("design:paramtypes", [])
|
|
74
|
+
], Poll);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -47,6 +47,9 @@ import { ConversationsV2 } from './models/ConversationsV2Model';
|
|
|
47
47
|
import { ConversationParticipantsV2 } from './models/ConversationParticipantsV2Model';
|
|
48
48
|
import { MessagesV2 } from './models/MessagesV2Model';
|
|
49
49
|
import { MessageReadStatus } from './models/MessageReadStatusModel';
|
|
50
|
+
import { Poll } from './models/PollsModel';
|
|
51
|
+
import { PollOption } from './models/PollOptionsModel';
|
|
52
|
+
import { PollVote } from './models/PollVotesModel';
|
|
50
53
|
import { ShiftDetails } from './models/ShifttimesModel';
|
|
51
54
|
import { AttendanceDetails } from './models/AttendanceModel';
|
|
52
55
|
import { UserShift } from './models/UserShiftModel';
|
|
@@ -204,6 +207,8 @@ import { ProjectMilestoneDocuments } from './models/ProjectMilestoneDocumentsMod
|
|
|
204
207
|
import { ProjectTasks } from './models/ProjectTasksModel';
|
|
205
208
|
import { ProjectTaskActivity } from './models/ProjectTaskActivityModel';
|
|
206
209
|
import { ProjectTaskComments } from './models/ProjectTaskCommentsModel';
|
|
210
|
+
import { DocumentationFolder } from './models/DocumentationFolderModel';
|
|
211
|
+
import { DocumentationFile } from './models/DocumentationFileModel';
|
|
207
212
|
import { UniversalLanguageMaster } from './models/UniversalLanguageMasterModel';
|
|
208
213
|
import { MeetingAppointmentReminderLog } from './models/MeetingAppointmentReminderLogModel';
|
|
209
214
|
|
|
@@ -258,6 +263,9 @@ export const AppDataSource = new DataSource({
|
|
|
258
263
|
ConversationParticipantsV2,
|
|
259
264
|
MessagesV2,
|
|
260
265
|
MessageReadStatus,
|
|
266
|
+
Poll,
|
|
267
|
+
PollOption,
|
|
268
|
+
PollVote,
|
|
261
269
|
ShiftDetails,
|
|
262
270
|
AttendanceDetails,
|
|
263
271
|
UserShift,
|
|
@@ -410,6 +418,8 @@ export const AppDataSource = new DataSource({
|
|
|
410
418
|
ProjectTasks,
|
|
411
419
|
ProjectTaskActivity,
|
|
412
420
|
ProjectTaskComments,
|
|
421
|
+
DocumentationFolder,
|
|
422
|
+
DocumentationFile,
|
|
413
423
|
UniversalLanguageMaster,
|
|
414
424
|
MeetingAppointmentReminderLog
|
|
415
425
|
],
|
package/src/index.ts
CHANGED
|
@@ -26,6 +26,9 @@ export * from './models/ConversationsV2Model';
|
|
|
26
26
|
export * from './models/ConversationParticipantsV2Model';
|
|
27
27
|
export * from './models/MessagesV2Model';
|
|
28
28
|
export * from './models/MessageReadStatusModel';
|
|
29
|
+
export * from './models/PollsModel';
|
|
30
|
+
export * from './models/PollOptionsModel';
|
|
31
|
+
export * from './models/PollVotesModel';
|
|
29
32
|
export * from './models/FMServices';
|
|
30
33
|
export * from './models/FMSubservices';
|
|
31
34
|
export * from './models/serviceBookmarksModel';
|
|
@@ -314,6 +317,8 @@ export * from './models/ProjectMilestoneDocumentsModel';
|
|
|
314
317
|
export * from './models/ProjectTasksModel';
|
|
315
318
|
export * from './models/ProjectTaskActivityModel';
|
|
316
319
|
export * from './models/ProjectTaskCommentsModel';
|
|
320
|
+
export * from './models/DocumentationFolderModel';
|
|
321
|
+
export * from './models/DocumentationFileModel';
|
|
317
322
|
|
|
318
323
|
// Employee Milestones Models
|
|
319
324
|
export * from './models/EmployeeMilestonesModel';
|
|
@@ -323,4 +328,4 @@ export * from './models/MissionTravelPassportExpiryNotificationConfigModel';
|
|
|
323
328
|
export * from './models/ServicesNotificationConfigsModel';
|
|
324
329
|
export { ServicesNotificationTriggerType } from './models/ServicesNotificationConfigsModel';
|
|
325
330
|
// Moodle Users Model
|
|
326
|
-
export * from './models/MoodleUsersModel';
|
|
331
|
+
export * from './models/MoodleUsersModel';
|
|
@@ -24,6 +24,12 @@ export class ConversationsV2 extends BaseModel {
|
|
|
24
24
|
@Column({ type: 'int', nullable: true })
|
|
25
25
|
meeting_id?: number | null;
|
|
26
26
|
|
|
27
|
+
@Column({ type: 'int', nullable: true })
|
|
28
|
+
appointment_id?: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: true })
|
|
31
|
+
project_id?: number | null;
|
|
32
|
+
|
|
27
33
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
28
34
|
last_message_at: Date;
|
|
29
35
|
|
|
@@ -38,6 +44,8 @@ export class ConversationsV2 extends BaseModel {
|
|
|
38
44
|
super();
|
|
39
45
|
this.conversation_type = ConversationTypeV2.DIRECT;
|
|
40
46
|
this.meeting_id = null;
|
|
47
|
+
this.appointment_id = null;
|
|
48
|
+
this.project_id = null;
|
|
41
49
|
this.last_message_at = new Date();
|
|
42
50
|
}
|
|
43
51
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'documentation_files' })
|
|
5
|
+
export class DocumentationFile extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
folder_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text', nullable: true })
|
|
10
|
+
file_path: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
13
|
+
filename: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'bigint', nullable: true })
|
|
16
|
+
filesize: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
19
|
+
filetype: string;
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
folder_id?: number,
|
|
23
|
+
file_path?: string,
|
|
24
|
+
filename?: string,
|
|
25
|
+
filesize?: number,
|
|
26
|
+
filetype?: string
|
|
27
|
+
) {
|
|
28
|
+
super();
|
|
29
|
+
this.folder_id = folder_id ?? 0;
|
|
30
|
+
this.file_path = file_path ?? '';
|
|
31
|
+
this.filename = filename ?? '';
|
|
32
|
+
this.filesize = filesize ?? 0;
|
|
33
|
+
this.filetype = filetype ?? '';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'documentation_folders' })
|
|
5
|
+
export class DocumentationFolder extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
project_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: true })
|
|
13
|
+
parent_folder_id: number | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'text', nullable: true })
|
|
16
|
+
description: string;
|
|
17
|
+
|
|
18
|
+
constructor(project_id?: number, name?: string, parent_folder_id?: number | null, description?: string) {
|
|
19
|
+
super();
|
|
20
|
+
this.project_id = project_id ?? 0;
|
|
21
|
+
this.name = name ?? '';
|
|
22
|
+
this.parent_folder_id = parent_folder_id ?? null;
|
|
23
|
+
this.description = description ?? '';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -8,7 +8,8 @@ export enum MessageTypeV2 {
|
|
|
8
8
|
TEXT = "text",
|
|
9
9
|
IMAGE = "image",
|
|
10
10
|
FILE = "file",
|
|
11
|
-
VIDEO = "video"
|
|
11
|
+
VIDEO = "video",
|
|
12
|
+
POLL = "poll"
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
@Entity({ name: 'messages_v2' })
|
|
@@ -39,6 +40,9 @@ export class MessagesV2 extends BaseModel {
|
|
|
39
40
|
@Column({ type: 'int', nullable: true })
|
|
40
41
|
reply_to_message_id?: number;
|
|
41
42
|
|
|
43
|
+
@Column({ type: 'int', nullable: true })
|
|
44
|
+
reference_id?: number;
|
|
45
|
+
|
|
42
46
|
// Relations
|
|
43
47
|
@ManyToOne(() => ConversationsV2, conversation => conversation.messages)
|
|
44
48
|
@JoinColumn({ name: 'conversation_id' })
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
import { Poll } from "./PollsModel";
|
|
4
|
+
import { PollVote } from "./PollVotesModel";
|
|
5
|
+
|
|
6
|
+
@Entity({ name: "poll_options" })
|
|
7
|
+
export class PollOption extends BaseModel {
|
|
8
|
+
@Column({ type: "int", nullable: false })
|
|
9
|
+
poll_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ type: "varchar", length: 500, nullable: false })
|
|
12
|
+
option_text: string;
|
|
13
|
+
|
|
14
|
+
@ManyToOne(() => Poll, (poll) => poll.options, { nullable: false })
|
|
15
|
+
@JoinColumn({ name: "poll_id" })
|
|
16
|
+
poll?: Poll;
|
|
17
|
+
|
|
18
|
+
@OneToMany(() => PollVote, (vote) => vote.option)
|
|
19
|
+
votes?: PollVote[];
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.poll_id = 0;
|
|
24
|
+
this.option_text = "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
import { Poll } from "./PollsModel";
|
|
4
|
+
import { PollOption } from "./PollOptionsModel";
|
|
5
|
+
import { User } from "./user";
|
|
6
|
+
|
|
7
|
+
@Entity({ name: "poll_votes" })
|
|
8
|
+
@Index("uq_poll_option_user", ["poll_id", "option_id", "user_id"], { unique: true })
|
|
9
|
+
export class PollVote extends BaseModel {
|
|
10
|
+
@Column({ type: "int", nullable: false })
|
|
11
|
+
poll_id: number;
|
|
12
|
+
|
|
13
|
+
@Column({ type: "int", nullable: false })
|
|
14
|
+
option_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: "int", nullable: false })
|
|
17
|
+
user_id: number;
|
|
18
|
+
|
|
19
|
+
@ManyToOne(() => Poll, (poll) => poll.votes, { nullable: false })
|
|
20
|
+
@JoinColumn({ name: "poll_id" })
|
|
21
|
+
poll?: Poll;
|
|
22
|
+
|
|
23
|
+
@ManyToOne(() => PollOption, (option) => option.votes, { nullable: false })
|
|
24
|
+
@JoinColumn({ name: "option_id" })
|
|
25
|
+
option?: PollOption;
|
|
26
|
+
|
|
27
|
+
@ManyToOne(() => User, { nullable: false })
|
|
28
|
+
@JoinColumn({ name: "user_id" })
|
|
29
|
+
user?: User;
|
|
30
|
+
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.poll_id = 0;
|
|
34
|
+
this.option_id = 0;
|
|
35
|
+
this.user_id = 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
import { ConversationsV2 } from "./ConversationsV2Model";
|
|
4
|
+
import { PollOption } from "./PollOptionsModel";
|
|
5
|
+
import { PollVote } from "./PollVotesModel";
|
|
6
|
+
|
|
7
|
+
@Entity({ name: "poll" })
|
|
8
|
+
export class Poll extends BaseModel {
|
|
9
|
+
@Column({ type: "int", nullable: false })
|
|
10
|
+
group_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: "int", nullable: true })
|
|
13
|
+
meeting_id?: number | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: "int", nullable: false })
|
|
16
|
+
conversation_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
19
|
+
title: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: "text", nullable: false })
|
|
22
|
+
question: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: "timestamptz", nullable: true })
|
|
25
|
+
expires_at?: Date | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "boolean", default: false })
|
|
28
|
+
allow_multiple: boolean;
|
|
29
|
+
|
|
30
|
+
@ManyToOne(() => ConversationsV2, { nullable: false })
|
|
31
|
+
@JoinColumn({ name: "conversation_id" })
|
|
32
|
+
conversation?: ConversationsV2;
|
|
33
|
+
|
|
34
|
+
@OneToMany(() => PollOption, (option) => option.poll)
|
|
35
|
+
options?: PollOption[];
|
|
36
|
+
|
|
37
|
+
@OneToMany(() => PollVote, (vote) => vote.poll)
|
|
38
|
+
votes?: PollVote[];
|
|
39
|
+
|
|
40
|
+
constructor() {
|
|
41
|
+
super();
|
|
42
|
+
this.group_id = 0;
|
|
43
|
+
this.meeting_id = null;
|
|
44
|
+
this.conversation_id = 0;
|
|
45
|
+
this.title = "";
|
|
46
|
+
this.question = "";
|
|
47
|
+
this.allow_multiple = false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'project_milestone_documents' })
|
|
5
|
-
export class ProjectMilestoneDocuments extends BaseModel {
|
|
6
|
-
@Column({ type: 'int' })
|
|
7
|
-
project_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'int' })
|
|
10
|
-
milestone_id: number;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'text', nullable: true })
|
|
13
|
-
document_link: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
16
|
-
filename: string;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'bigint', nullable: true })
|
|
19
|
-
filesize: number;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
22
|
-
filetype: string;
|
|
23
|
-
|
|
24
|
-
constructor(
|
|
25
|
-
project_id?: number,
|
|
26
|
-
milestone_id?: number,
|
|
27
|
-
document_link?: string,
|
|
28
|
-
filename?: string,
|
|
29
|
-
filesize?: number,
|
|
30
|
-
filetype?: string
|
|
31
|
-
) {
|
|
32
|
-
super();
|
|
33
|
-
this.project_id = project_id ?? 0;
|
|
34
|
-
this.milestone_id = milestone_id ?? 0;
|
|
35
|
-
this.document_link = document_link ?? '';
|
|
36
|
-
this.filename = filename ?? '';
|
|
37
|
-
this.filesize = filesize ?? 0;
|
|
38
|
-
this.filetype = filetype ?? '';
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'project_milestone_documents' })
|
|
5
|
+
export class ProjectMilestoneDocuments extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
project_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int' })
|
|
10
|
+
milestone_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
document_link: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
16
|
+
filename: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'bigint', nullable: true })
|
|
19
|
+
filesize: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
22
|
+
filetype: string;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
project_id?: number,
|
|
26
|
+
milestone_id?: number,
|
|
27
|
+
document_link?: string,
|
|
28
|
+
filename?: string,
|
|
29
|
+
filesize?: number,
|
|
30
|
+
filetype?: string
|
|
31
|
+
) {
|
|
32
|
+
super();
|
|
33
|
+
this.project_id = project_id ?? 0;
|
|
34
|
+
this.milestone_id = milestone_id ?? 0;
|
|
35
|
+
this.document_link = document_link ?? '';
|
|
36
|
+
this.filename = filename ?? '';
|
|
37
|
+
this.filesize = filesize ?? 0;
|
|
38
|
+
this.filetype = filetype ?? '';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'project_milestones' })
|
|
5
|
-
export class ProjectMilestones extends BaseModel {
|
|
6
|
-
@Column({ type: 'int' })
|
|
7
|
-
project_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'varchar', length: 255 })
|
|
10
|
-
milestone_name: string;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'jsonb', nullable: true })
|
|
13
|
-
vendor_names: string[] | null;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'text', nullable: true })
|
|
16
|
-
milestone_description: string;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'date', nullable: true })
|
|
19
|
-
estimated_startdate: Date | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'date', nullable: true })
|
|
22
|
-
estimated_enddate: Date | null;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'date', nullable: true })
|
|
25
|
-
actual_startdate: Date | null;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'date', nullable: true })
|
|
28
|
-
actual_enddate: Date | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'jsonb', nullable: true })
|
|
31
|
-
checklist: string[] | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'varchar', length: 50, default: 'Not Started' })
|
|
34
|
-
status: string;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', default: 1, nullable: true })
|
|
37
|
-
phase: number;
|
|
38
|
-
|
|
39
|
-
constructor(
|
|
40
|
-
project_id?: number,
|
|
41
|
-
milestone_name?: string,
|
|
42
|
-
vendor_names?: string[] | null,
|
|
43
|
-
milestone_description?: string,
|
|
44
|
-
estimated_startdate?: Date | null,
|
|
45
|
-
estimated_enddate?: Date | null,
|
|
46
|
-
actual_startdate?: Date | null,
|
|
47
|
-
actual_enddate?: Date | null,
|
|
48
|
-
checklist?: string[] | null,
|
|
49
|
-
status?: string,
|
|
50
|
-
phase?: number
|
|
51
|
-
) {
|
|
52
|
-
super();
|
|
53
|
-
this.project_id = project_id ?? 0;
|
|
54
|
-
this.milestone_name = milestone_name ?? '';
|
|
55
|
-
this.vendor_names = vendor_names ?? null;
|
|
56
|
-
this.milestone_description = milestone_description ?? '';
|
|
57
|
-
this.estimated_startdate = estimated_startdate ?? null;
|
|
58
|
-
this.estimated_enddate = estimated_enddate ?? null;
|
|
59
|
-
this.actual_startdate = actual_startdate ?? null;
|
|
60
|
-
this.actual_enddate = actual_enddate ?? null;
|
|
61
|
-
this.checklist = checklist ?? null;
|
|
62
|
-
this.status = status ?? 'Not Started';
|
|
63
|
-
this.phase = phase ?? 1;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'project_milestones' })
|
|
5
|
+
export class ProjectMilestones extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
project_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 255 })
|
|
10
|
+
milestone_name: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
13
|
+
vendor_names: string[] | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'text', nullable: true })
|
|
16
|
+
milestone_description: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'date', nullable: true })
|
|
19
|
+
estimated_startdate: Date | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'date', nullable: true })
|
|
22
|
+
estimated_enddate: Date | null;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'date', nullable: true })
|
|
25
|
+
actual_startdate: Date | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'date', nullable: true })
|
|
28
|
+
actual_enddate: Date | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
31
|
+
checklist: string[] | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'varchar', length: 50, default: 'Not Started' })
|
|
34
|
+
status: string;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', default: 1, nullable: true })
|
|
37
|
+
phase: number;
|
|
38
|
+
|
|
39
|
+
constructor(
|
|
40
|
+
project_id?: number,
|
|
41
|
+
milestone_name?: string,
|
|
42
|
+
vendor_names?: string[] | null,
|
|
43
|
+
milestone_description?: string,
|
|
44
|
+
estimated_startdate?: Date | null,
|
|
45
|
+
estimated_enddate?: Date | null,
|
|
46
|
+
actual_startdate?: Date | null,
|
|
47
|
+
actual_enddate?: Date | null,
|
|
48
|
+
checklist?: string[] | null,
|
|
49
|
+
status?: string,
|
|
50
|
+
phase?: number
|
|
51
|
+
) {
|
|
52
|
+
super();
|
|
53
|
+
this.project_id = project_id ?? 0;
|
|
54
|
+
this.milestone_name = milestone_name ?? '';
|
|
55
|
+
this.vendor_names = vendor_names ?? null;
|
|
56
|
+
this.milestone_description = milestone_description ?? '';
|
|
57
|
+
this.estimated_startdate = estimated_startdate ?? null;
|
|
58
|
+
this.estimated_enddate = estimated_enddate ?? null;
|
|
59
|
+
this.actual_startdate = actual_startdate ?? null;
|
|
60
|
+
this.actual_enddate = actual_enddate ?? null;
|
|
61
|
+
this.checklist = checklist ?? null;
|
|
62
|
+
this.status = status ?? 'Not Started';
|
|
63
|
+
this.phase = phase ?? 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'project_task_activity' })
|
|
5
|
-
export class ProjectTaskActivity extends BaseModel {
|
|
6
|
-
@Column({ type: 'int' })
|
|
7
|
-
task_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
10
|
-
activity_type: string;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'text', nullable: true })
|
|
13
|
-
description: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'text', nullable: true })
|
|
16
|
-
old_value: string | null;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'text', nullable: true })
|
|
19
|
-
new_value: string | null;
|
|
20
|
-
|
|
21
|
-
constructor(
|
|
22
|
-
task_id?: number,
|
|
23
|
-
activity_type?: string,
|
|
24
|
-
description?: string,
|
|
25
|
-
old_value?: string | null,
|
|
26
|
-
new_value?: string | null
|
|
27
|
-
) {
|
|
28
|
-
super();
|
|
29
|
-
this.task_id = task_id ?? 0;
|
|
30
|
-
this.activity_type = activity_type ?? '';
|
|
31
|
-
this.description = description ?? '';
|
|
32
|
-
this.old_value = old_value ?? null;
|
|
33
|
-
this.new_value = new_value ?? null;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'project_task_activity' })
|
|
5
|
+
export class ProjectTaskActivity extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
task_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
10
|
+
activity_type: string;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
description: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'text', nullable: true })
|
|
16
|
+
old_value: string | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text', nullable: true })
|
|
19
|
+
new_value: string | null;
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
task_id?: number,
|
|
23
|
+
activity_type?: string,
|
|
24
|
+
description?: string,
|
|
25
|
+
old_value?: string | null,
|
|
26
|
+
new_value?: string | null
|
|
27
|
+
) {
|
|
28
|
+
super();
|
|
29
|
+
this.task_id = task_id ?? 0;
|
|
30
|
+
this.activity_type = activity_type ?? '';
|
|
31
|
+
this.description = description ?? '';
|
|
32
|
+
this.old_value = old_value ?? null;
|
|
33
|
+
this.new_value = new_value ?? null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'project_task_comments' })
|
|
5
|
-
export class ProjectTaskComments extends BaseModel {
|
|
6
|
-
@Column({ type: 'int' })
|
|
7
|
-
task_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'text' })
|
|
10
|
-
comment: string;
|
|
11
|
-
|
|
12
|
-
constructor(task_id?: number, comment?: string) {
|
|
13
|
-
super();
|
|
14
|
-
this.task_id = task_id ?? 0;
|
|
15
|
-
this.comment = comment ?? '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'project_task_comments' })
|
|
5
|
+
export class ProjectTaskComments extends BaseModel {
|
|
6
|
+
@Column({ type: 'int' })
|
|
7
|
+
task_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'text' })
|
|
10
|
+
comment: string;
|
|
11
|
+
|
|
12
|
+
constructor(task_id?: number, comment?: string) {
|
|
13
|
+
super();
|
|
14
|
+
this.task_id = task_id ?? 0;
|
|
15
|
+
this.comment = comment ?? '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export interface TaskAttachmentItem {
|
|
5
|
-
link?: string;
|
|
6
|
-
filename?: string;
|
|
7
|
-
filesize?: number;
|
|
8
|
-
filetype?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const TASK_PRIORITY = ['low', 'medium', 'high'] as const;
|
|
12
|
-
export const TASK_STATUS = ['Not started', 'Pending', 'In Progress', 'Completed'] as const;
|
|
13
|
-
|
|
14
|
-
@Entity({ name: 'project_tasks' })
|
|
15
|
-
export class ProjectTasks extends BaseModel {
|
|
16
|
-
@Column({ type: 'int' })
|
|
17
|
-
project_id: number;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'varchar', length: 500 })
|
|
20
|
-
task_title: string;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'text', nullable: true })
|
|
23
|
-
task_description: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'jsonb', nullable: true })
|
|
26
|
-
attachments: TaskAttachmentItem[] | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'varchar', length: 20, default: 'medium' })
|
|
29
|
-
priority: string;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'varchar', length: 50, default: 'Not started' })
|
|
32
|
-
status: string;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'int', nullable: true })
|
|
35
|
-
milestone_id: number | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'int', default: 1, nullable: true })
|
|
38
|
-
phase: number;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'int', nullable: true })
|
|
41
|
-
assign_to: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'int', nullable: true })
|
|
44
|
-
manager_id: number | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'date', nullable: true })
|
|
47
|
-
start_date: Date | null;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'date', nullable: true })
|
|
50
|
-
end_date: Date | null;
|
|
51
|
-
|
|
52
|
-
constructor(
|
|
53
|
-
project_id?: number,
|
|
54
|
-
task_title?: string,
|
|
55
|
-
task_description?: string,
|
|
56
|
-
attachments?: TaskAttachmentItem[] | null,
|
|
57
|
-
priority?: string,
|
|
58
|
-
status?: string,
|
|
59
|
-
milestone_id?: number | null,
|
|
60
|
-
phase?: number,
|
|
61
|
-
assign_to?: number | null,
|
|
62
|
-
manager_id?: number | null,
|
|
63
|
-
start_date?: Date | null,
|
|
64
|
-
end_date?: Date | null
|
|
65
|
-
) {
|
|
66
|
-
super();
|
|
67
|
-
this.project_id = project_id ?? 0;
|
|
68
|
-
this.task_title = task_title ?? '';
|
|
69
|
-
this.task_description = task_description ?? '';
|
|
70
|
-
this.attachments = attachments ?? null;
|
|
71
|
-
this.priority = priority ?? 'medium';
|
|
72
|
-
this.status = status ?? 'Not started';
|
|
73
|
-
this.milestone_id = milestone_id ?? null;
|
|
74
|
-
this.phase = phase ?? 1;
|
|
75
|
-
this.assign_to = assign_to ?? null;
|
|
76
|
-
this.manager_id = manager_id ?? null;
|
|
77
|
-
this.start_date = start_date ?? null;
|
|
78
|
-
this.end_date = end_date ?? null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export interface TaskAttachmentItem {
|
|
5
|
+
link?: string;
|
|
6
|
+
filename?: string;
|
|
7
|
+
filesize?: number;
|
|
8
|
+
filetype?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const TASK_PRIORITY = ['low', 'medium', 'high'] as const;
|
|
12
|
+
export const TASK_STATUS = ['Not started', 'Pending', 'In Progress', 'Completed'] as const;
|
|
13
|
+
|
|
14
|
+
@Entity({ name: 'project_tasks' })
|
|
15
|
+
export class ProjectTasks extends BaseModel {
|
|
16
|
+
@Column({ type: 'int' })
|
|
17
|
+
project_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 500 })
|
|
20
|
+
task_title: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'text', nullable: true })
|
|
23
|
+
task_description: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
26
|
+
attachments: TaskAttachmentItem[] | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', length: 20, default: 'medium' })
|
|
29
|
+
priority: string;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 50, default: 'Not started' })
|
|
32
|
+
status: string;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'int', nullable: true })
|
|
35
|
+
milestone_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'int', default: 1, nullable: true })
|
|
38
|
+
phase: number;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'int', nullable: true })
|
|
41
|
+
assign_to: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'int', nullable: true })
|
|
44
|
+
manager_id: number | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'date', nullable: true })
|
|
47
|
+
start_date: Date | null;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'date', nullable: true })
|
|
50
|
+
end_date: Date | null;
|
|
51
|
+
|
|
52
|
+
constructor(
|
|
53
|
+
project_id?: number,
|
|
54
|
+
task_title?: string,
|
|
55
|
+
task_description?: string,
|
|
56
|
+
attachments?: TaskAttachmentItem[] | null,
|
|
57
|
+
priority?: string,
|
|
58
|
+
status?: string,
|
|
59
|
+
milestone_id?: number | null,
|
|
60
|
+
phase?: number,
|
|
61
|
+
assign_to?: number | null,
|
|
62
|
+
manager_id?: number | null,
|
|
63
|
+
start_date?: Date | null,
|
|
64
|
+
end_date?: Date | null
|
|
65
|
+
) {
|
|
66
|
+
super();
|
|
67
|
+
this.project_id = project_id ?? 0;
|
|
68
|
+
this.task_title = task_title ?? '';
|
|
69
|
+
this.task_description = task_description ?? '';
|
|
70
|
+
this.attachments = attachments ?? null;
|
|
71
|
+
this.priority = priority ?? 'medium';
|
|
72
|
+
this.status = status ?? 'Not started';
|
|
73
|
+
this.milestone_id = milestone_id ?? null;
|
|
74
|
+
this.phase = phase ?? 1;
|
|
75
|
+
this.assign_to = assign_to ?? null;
|
|
76
|
+
this.manager_id = manager_id ?? null;
|
|
77
|
+
this.start_date = start_date ?? null;
|
|
78
|
+
this.end_date = end_date ?? null;
|
|
79
|
+
}
|
|
80
|
+
}
|