@platform-modules/foreign-ministry 1.3.198 → 1.3.199
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 +5 -10
- package/dist/data-source.js +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/models/ConversationsV2Model.d.ts +2 -0
- package/dist/models/ConversationsV2Model.js +10 -0
- package/dist/models/EmbassyMasterModel.d.ts +16 -0
- package/dist/models/EmbassyMasterModel.js +75 -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/dist/models/UserDependentsModel.d.ts +18 -0
- package/dist/models/UserDependentsModel.js +94 -0
- package/package.json +1 -1
- package/src/data-source.ts +6 -0
- package/src/index.ts +4 -1
- package/src/models/ConversationsV2Model.ts +8 -0
- package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
- package/src/models/LanguageCourseRequestModel.ts +67 -67
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MessagesV2Model.ts +5 -1
- package/src/models/MissionTravelApprovalModel.ts +101 -101
- package/src/models/MissionTravelAttachmentModel.ts +56 -56
- package/src/models/MissionTravelChatModel.ts +52 -52
- package/src/models/MissionTravelPersonModel.ts +105 -105
- package/src/models/MissionTravelWorkflowModel.ts +54 -54
- package/src/models/PollOptionsModel.ts +26 -0
- package/src/models/PollVotesModel.ts +37 -0
- package/src/models/PollsModel.ts +49 -0
- package/src/models/ProjectModel.ts +65 -65
- package/src/models/SectionModel.ts +35 -35
- package/src/models/ServicesNotificationConfigsModel.ts +55 -55
- package/src/models/TelephoneDirectoryModel.ts +20 -20
- package/dist/models/MissionTravelClassConfigModel.d.ts +0 -10
- package/dist/models/MissionTravelClassConfigModel.js +0 -50
- package/dist/models/MissionTravelPerdiemModel.d.ts +0 -10
- package/dist/models/MissionTravelPerdiemModel.js +0 -54
package/.env
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
DB_HOST = 164.52.222.169
|
|
8
|
-
DB_USER = postgres_admin_user
|
|
9
|
-
DB_PASS = pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
10
|
-
DB_NAME= FM
|
|
1
|
+
DB_HOST=localhost
|
|
2
|
+
DB_PORT=5432
|
|
3
|
+
DB_USER=postgres
|
|
4
|
+
DB_PASS=Fa@123
|
|
5
|
+
DB_NAME=FM
|
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");
|
|
@@ -251,6 +254,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
251
254
|
ConversationParticipantsV2Model_1.ConversationParticipantsV2,
|
|
252
255
|
MessagesV2Model_1.MessagesV2,
|
|
253
256
|
MessageReadStatusModel_1.MessageReadStatus,
|
|
257
|
+
PollsModel_1.Poll,
|
|
258
|
+
PollOptionsModel_1.PollOption,
|
|
259
|
+
PollVotesModel_1.PollVote,
|
|
254
260
|
ShifttimesModel_1.ShiftDetails,
|
|
255
261
|
AttendanceModel_1.AttendanceDetails,
|
|
256
262
|
UserShiftModel_1.UserShift,
|
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';
|
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);
|
|
@@ -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,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class EmbassyMaster extends BaseModel {
|
|
3
|
+
embassy_name: string;
|
|
4
|
+
embassy_name_arabic: string | null;
|
|
5
|
+
country_id: number | null;
|
|
6
|
+
city: string | null;
|
|
7
|
+
address: string | null;
|
|
8
|
+
phone: string | null;
|
|
9
|
+
fax: string | null;
|
|
10
|
+
email: string | null;
|
|
11
|
+
website: string | null;
|
|
12
|
+
description: string | null;
|
|
13
|
+
is_active: boolean;
|
|
14
|
+
display_order: number;
|
|
15
|
+
constructor(embassy_name: string);
|
|
16
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.EmbassyMaster = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let EmbassyMaster = class EmbassyMaster extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(embassy_name) {
|
|
17
|
+
super();
|
|
18
|
+
this.embassy_name = embassy_name;
|
|
19
|
+
this.is_active = true;
|
|
20
|
+
this.display_order = 0;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.EmbassyMaster = EmbassyMaster;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], EmbassyMaster.prototype, "embassy_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], EmbassyMaster.prototype, "embassy_name_arabic", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], EmbassyMaster.prototype, "country_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], EmbassyMaster.prototype, "city", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], EmbassyMaster.prototype, "address", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], EmbassyMaster.prototype, "phone", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], EmbassyMaster.prototype, "fax", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], EmbassyMaster.prototype, "email", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], EmbassyMaster.prototype, "website", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], EmbassyMaster.prototype, "description", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
66
|
+
__metadata("design:type", Boolean)
|
|
67
|
+
], EmbassyMaster.prototype, "is_active", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], EmbassyMaster.prototype, "display_order", void 0);
|
|
72
|
+
exports.EmbassyMaster = EmbassyMaster = __decorate([
|
|
73
|
+
(0, typeorm_1.Entity)({ name: 'embassy_master' }),
|
|
74
|
+
__metadata("design:paramtypes", [String])
|
|
75
|
+
], EmbassyMaster);
|
|
@@ -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);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class UserDependents extends BaseModel {
|
|
3
|
+
user_id: number;
|
|
4
|
+
first_name: string | null;
|
|
5
|
+
last_name: string | null;
|
|
6
|
+
family_name: string | null;
|
|
7
|
+
dob: Date | null;
|
|
8
|
+
age: number | null;
|
|
9
|
+
relation_type: string | null;
|
|
10
|
+
passport_available: boolean;
|
|
11
|
+
passport_number: string | null;
|
|
12
|
+
passport_type: string | null;
|
|
13
|
+
passport_issue_date: Date | null;
|
|
14
|
+
passport_place_of_issue: string | null;
|
|
15
|
+
passport_expiry_date: Date | null;
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
constructor(user_id?: number, first_name?: string, last_name?: string, family_name?: string, dob?: Date, age?: number, relation_type?: string, passport_available?: boolean, passport_number?: string, passport_type?: string, passport_issue_date?: Date, passport_place_of_issue?: string, passport_expiry_date?: Date);
|
|
18
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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.UserDependents = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let UserDependents = class UserDependents extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(user_id, first_name, last_name, family_name, dob, age, relation_type, passport_available, passport_number, passport_type, passport_issue_date, passport_place_of_issue, passport_expiry_date) {
|
|
17
|
+
super();
|
|
18
|
+
this.user_id = user_id || 0;
|
|
19
|
+
this.first_name = first_name || null;
|
|
20
|
+
this.last_name = last_name || null;
|
|
21
|
+
this.family_name = family_name || null;
|
|
22
|
+
this.dob = dob || null;
|
|
23
|
+
this.age = age || null;
|
|
24
|
+
this.relation_type = relation_type || null;
|
|
25
|
+
this.passport_available = passport_available || false;
|
|
26
|
+
this.passport_number = passport_number || null;
|
|
27
|
+
this.passport_type = passport_type || null;
|
|
28
|
+
this.passport_issue_date = passport_issue_date || null;
|
|
29
|
+
this.passport_place_of_issue = passport_place_of_issue || null;
|
|
30
|
+
this.passport_expiry_date = passport_expiry_date || null;
|
|
31
|
+
this.is_active = true;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.UserDependents = UserDependents;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], UserDependents.prototype, "user_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], UserDependents.prototype, "first_name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], UserDependents.prototype, "last_name", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], UserDependents.prototype, "family_name", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], UserDependents.prototype, "dob", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], UserDependents.prototype, "age", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], UserDependents.prototype, "relation_type", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
65
|
+
__metadata("design:type", Boolean)
|
|
66
|
+
], UserDependents.prototype, "passport_available", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], UserDependents.prototype, "passport_number", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], UserDependents.prototype, "passport_type", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], UserDependents.prototype, "passport_issue_date", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], UserDependents.prototype, "passport_place_of_issue", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], UserDependents.prototype, "passport_expiry_date", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
89
|
+
__metadata("design:type", Boolean)
|
|
90
|
+
], UserDependents.prototype, "is_active", void 0);
|
|
91
|
+
exports.UserDependents = UserDependents = __decorate([
|
|
92
|
+
(0, typeorm_1.Entity)({ name: 'user_dependents' }),
|
|
93
|
+
__metadata("design:paramtypes", [Number, String, String, String, Date, Number, String, Boolean, String, String, Date, String, Date])
|
|
94
|
+
], UserDependents);
|
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';
|
|
@@ -258,6 +261,9 @@ export const AppDataSource = new DataSource({
|
|
|
258
261
|
ConversationParticipantsV2,
|
|
259
262
|
MessagesV2,
|
|
260
263
|
MessageReadStatus,
|
|
264
|
+
Poll,
|
|
265
|
+
PollOption,
|
|
266
|
+
PollVote,
|
|
261
267
|
ShiftDetails,
|
|
262
268
|
AttendanceDetails,
|
|
263
269
|
UserShift,
|
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';
|
|
@@ -323,4 +326,4 @@ export * from './models/MissionTravelPassportExpiryNotificationConfigModel';
|
|
|
323
326
|
export * from './models/ServicesNotificationConfigsModel';
|
|
324
327
|
export { ServicesNotificationTriggerType } from './models/ServicesNotificationConfigsModel';
|
|
325
328
|
// Moodle Users Model
|
|
326
|
-
export * from './models/MoodleUsersModel';
|
|
329
|
+
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
|
}
|