@platform-modules/foreign-ministry 1.0.45 → 1.0.47
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 +9 -3
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/models/ConversationParticipantModel.d.ts +2 -1
- package/dist/models/ConversationParticipantModel.js +7 -1
- package/dist/models/FaqsReactionsModel.d.ts +11 -0
- package/dist/models/FaqsReactionsModel.js +48 -0
- package/dist/models/HelpContentAttachmentModel.d.ts +7 -0
- package/dist/models/HelpContentAttachmentModel.js +39 -0
- package/dist/models/HelpContentCategoryModel.d.ts +5 -0
- package/dist/models/HelpContentCategoryModel.js +29 -0
- package/dist/models/HelpContentModel.d.ts +10 -0
- package/dist/models/HelpContentModel.js +54 -0
- package/dist/models/faqsModel.d.ts +1 -4
- package/dist/models/faqsModel.js +3 -16
- package/package.json +1 -1
- package/src/data-source.ts +9 -3
- package/src/index.ts +4 -1
- package/src/models/ConversationParticipantModel.ts +5 -0
- package/src/models/FaqsReactionsModel.ts +35 -0
- package/src/models/HelpContentAttachmentModel.ts +27 -0
- package/src/models/HelpContentCategoryModel.ts +17 -0
- package/src/models/HelpContentModel.ts +42 -0
- package/src/models/faqsModel.ts +3 -13
- package/src/models/questionTagsModel.ts +0 -22
package/dist/data-source.js
CHANGED
|
@@ -25,7 +25,7 @@ const DesignationModel_1 = require("./models/DesignationModel");
|
|
|
25
25
|
const DepartmentsModel_1 = require("./models/DepartmentsModel");
|
|
26
26
|
const DivisionModel_1 = require("./models/DivisionModel");
|
|
27
27
|
const faqsModel_1 = require("./models/faqsModel");
|
|
28
|
-
const
|
|
28
|
+
const FaqsReactionsModel_1 = require("./models/FaqsReactionsModel");
|
|
29
29
|
const ConversationModel_1 = require("./models/ConversationModel");
|
|
30
30
|
const ConversationParticipantModel_1 = require("./models/ConversationParticipantModel");
|
|
31
31
|
const MessageModel_1 = require("./models/MessageModel");
|
|
@@ -38,6 +38,9 @@ const PostsModel_1 = require("./models/PostsModel");
|
|
|
38
38
|
const CommentsModel_1 = require("./models/CommentsModel");
|
|
39
39
|
const PostAttachmentsModel_1 = require("./models/PostAttachmentsModel");
|
|
40
40
|
const PostReactionsModel_1 = require("./models/PostReactionsModel");
|
|
41
|
+
const HelpContentModel_1 = require("./models/HelpContentModel");
|
|
42
|
+
const HelpContentCategoryModel_1 = require("./models/HelpContentCategoryModel");
|
|
43
|
+
const HelpContentAttachmentModel_1 = require("./models/HelpContentAttachmentModel");
|
|
41
44
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
42
45
|
type: 'postgres',
|
|
43
46
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -68,7 +71,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
68
71
|
DepartmentsModel_1.Departments,
|
|
69
72
|
DivisionModel_1.Division,
|
|
70
73
|
faqsModel_1.Faqs,
|
|
71
|
-
|
|
74
|
+
FaqsReactionsModel_1.FaqsReactions,
|
|
72
75
|
ConversationModel_1.Conversation,
|
|
73
76
|
ConversationParticipantModel_1.ConversationParticipant,
|
|
74
77
|
MessageModel_1.Message,
|
|
@@ -80,6 +83,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
80
83
|
PostsModel_1.Posts,
|
|
81
84
|
CommentsModel_1.Comments,
|
|
82
85
|
PostAttachmentsModel_1.PostAttachments,
|
|
83
|
-
PostReactionsModel_1.PostReactions
|
|
86
|
+
PostReactionsModel_1.PostReactions,
|
|
87
|
+
HelpContentModel_1.HelpContent,
|
|
88
|
+
HelpContentCategoryModel_1.HelpContentCategories,
|
|
89
|
+
HelpContentAttachmentModel_1.HelpContentAttachments
|
|
84
90
|
],
|
|
85
91
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export * from './models/DesignationModel';
|
|
|
18
18
|
export * from './models/DepartmentsModel';
|
|
19
19
|
export * from './models/DivisionModel';
|
|
20
20
|
export * from './models/faqsModel';
|
|
21
|
-
export * from './models/
|
|
21
|
+
export * from './models/FaqsReactionsModel';
|
|
22
22
|
export * from './models/ConversationModel';
|
|
23
23
|
export * from './models/ConversationParticipantModel';
|
|
24
24
|
export * from './models/MessageModel';
|
|
@@ -31,3 +31,6 @@ export * from './models/PostsModel';
|
|
|
31
31
|
export * from './models/CommentsModel';
|
|
32
32
|
export * from './models/PostAttachmentsModel';
|
|
33
33
|
export * from './models/PostReactionsModel';
|
|
34
|
+
export * from './models/HelpContentModel';
|
|
35
|
+
export * from './models/HelpContentCategoryModel';
|
|
36
|
+
export * from './models/HelpContentAttachmentModel';
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ __exportStar(require("./models/DesignationModel"), exports);
|
|
|
34
34
|
__exportStar(require("./models/DepartmentsModel"), exports);
|
|
35
35
|
__exportStar(require("./models/DivisionModel"), exports);
|
|
36
36
|
__exportStar(require("./models/faqsModel"), exports);
|
|
37
|
-
__exportStar(require("./models/
|
|
37
|
+
__exportStar(require("./models/FaqsReactionsModel"), exports);
|
|
38
38
|
__exportStar(require("./models/ConversationModel"), exports);
|
|
39
39
|
__exportStar(require("./models/ConversationParticipantModel"), exports);
|
|
40
40
|
__exportStar(require("./models/MessageModel"), exports);
|
|
@@ -47,3 +47,6 @@ __exportStar(require("./models/PostsModel"), exports);
|
|
|
47
47
|
__exportStar(require("./models/CommentsModel"), exports);
|
|
48
48
|
__exportStar(require("./models/PostAttachmentsModel"), exports);
|
|
49
49
|
__exportStar(require("./models/PostReactionsModel"), exports);
|
|
50
|
+
__exportStar(require("./models/HelpContentModel"), exports);
|
|
51
|
+
__exportStar(require("./models/HelpContentCategoryModel"), exports);
|
|
52
|
+
__exportStar(require("./models/HelpContentAttachmentModel"), exports);
|
|
@@ -6,9 +6,10 @@ export declare class ConversationParticipant extends BaseModel {
|
|
|
6
6
|
userId: number;
|
|
7
7
|
roleId: number;
|
|
8
8
|
joinedAt: Date;
|
|
9
|
+
lastReadAt?: Date;
|
|
9
10
|
createdAt: Date;
|
|
10
11
|
updatedAt?: Date;
|
|
11
12
|
conversation?: Conversation;
|
|
12
13
|
user?: User;
|
|
13
|
-
constructor(conversationId?: number, userId?: number, roleId?: number, joinedAt?: Date, createdAt?: Date, updatedAt?: Date);
|
|
14
|
+
constructor(conversationId?: number, userId?: number, roleId?: number, joinedAt?: Date, lastReadAt?: Date, createdAt?: Date, updatedAt?: Date);
|
|
14
15
|
}
|
|
@@ -15,12 +15,13 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
const ConversationModel_1 = require("./ConversationModel");
|
|
16
16
|
const user_1 = require("./user");
|
|
17
17
|
let ConversationParticipant = class ConversationParticipant extends BaseModel_1.BaseModel {
|
|
18
|
-
constructor(conversationId, userId, roleId, joinedAt, createdAt, updatedAt) {
|
|
18
|
+
constructor(conversationId, userId, roleId, joinedAt, lastReadAt, createdAt, updatedAt) {
|
|
19
19
|
super();
|
|
20
20
|
this.conversationId = conversationId || 0;
|
|
21
21
|
this.userId = userId || 0;
|
|
22
22
|
this.roleId = roleId || 0;
|
|
23
23
|
this.joinedAt = joinedAt || new Date();
|
|
24
|
+
this.lastReadAt = lastReadAt;
|
|
24
25
|
this.createdAt = createdAt || new Date();
|
|
25
26
|
this.updatedAt = updatedAt;
|
|
26
27
|
}
|
|
@@ -42,6 +43,10 @@ __decorate([
|
|
|
42
43
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
43
44
|
__metadata("design:type", Date)
|
|
44
45
|
], ConversationParticipant.prototype, "joinedAt", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
48
|
+
__metadata("design:type", Date)
|
|
49
|
+
], ConversationParticipant.prototype, "lastReadAt", void 0);
|
|
45
50
|
__decorate([
|
|
46
51
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
47
52
|
__metadata("design:type", Date)
|
|
@@ -63,6 +68,7 @@ __decorate([
|
|
|
63
68
|
exports.ConversationParticipant = ConversationParticipant = __decorate([
|
|
64
69
|
(0, typeorm_1.Entity)({ name: 'conversation_participants' }),
|
|
65
70
|
__metadata("design:paramtypes", [Number, Number, Number, Date,
|
|
71
|
+
Date,
|
|
66
72
|
Date,
|
|
67
73
|
Date])
|
|
68
74
|
], ConversationParticipant);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum ReactionType {
|
|
3
|
+
LIKE = "like",
|
|
4
|
+
DISLIKE = "dislike"
|
|
5
|
+
}
|
|
6
|
+
export declare class FaqsReactions extends BaseModel {
|
|
7
|
+
user_id: number;
|
|
8
|
+
question_id: number;
|
|
9
|
+
reaction: ReactionType;
|
|
10
|
+
constructor(user_id: number, question_id: number, reaction: ReactionType);
|
|
11
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.FaqsReactions = exports.ReactionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var ReactionType;
|
|
16
|
+
(function (ReactionType) {
|
|
17
|
+
ReactionType["LIKE"] = "like";
|
|
18
|
+
ReactionType["DISLIKE"] = "dislike";
|
|
19
|
+
})(ReactionType || (exports.ReactionType = ReactionType = {}));
|
|
20
|
+
let FaqsReactions = class FaqsReactions extends BaseModel_1.BaseModel {
|
|
21
|
+
constructor(user_id, question_id, reaction) {
|
|
22
|
+
super();
|
|
23
|
+
this.user_id = user_id,
|
|
24
|
+
this.question_id = question_id,
|
|
25
|
+
this.reaction = reaction;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.FaqsReactions = FaqsReactions;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], FaqsReactions.prototype, "user_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], FaqsReactions.prototype, "question_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
type: 'enum',
|
|
40
|
+
enum: ReactionType,
|
|
41
|
+
nullable: false
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], FaqsReactions.prototype, "reaction", void 0);
|
|
45
|
+
exports.FaqsReactions = FaqsReactions = __decorate([
|
|
46
|
+
(0, typeorm_1.Entity)({ name: 'faqs_reactions' }),
|
|
47
|
+
__metadata("design:paramtypes", [Number, Number, String])
|
|
48
|
+
], FaqsReactions);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class HelpContentAttachments extends BaseModel {
|
|
3
|
+
help_content_Id: number;
|
|
4
|
+
attachment_url: string;
|
|
5
|
+
attachment_name: string;
|
|
6
|
+
constructor(help_content_Id: number, attachment_url: string, attachment_name: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.HelpContentAttachments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentAttachments = class HelpContentAttachments extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(help_content_Id, attachment_url, attachment_name) {
|
|
17
|
+
super();
|
|
18
|
+
this.help_content_Id = help_content_Id,
|
|
19
|
+
this.attachment_url = attachment_url,
|
|
20
|
+
this.attachment_name = attachment_name;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.HelpContentAttachments = HelpContentAttachments;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], HelpContentAttachments.prototype, "help_content_Id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], HelpContentAttachments.prototype, "attachment_url", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], HelpContentAttachments.prototype, "attachment_name", void 0);
|
|
36
|
+
exports.HelpContentAttachments = HelpContentAttachments = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'help_content_attachments' }),
|
|
38
|
+
__metadata("design:paramtypes", [Number, String, String])
|
|
39
|
+
], HelpContentAttachments);
|
|
@@ -0,0 +1,29 @@
|
|
|
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.HelpContentCategories = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentCategories = class HelpContentCategories extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.HelpContentCategories = HelpContentCategories;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], HelpContentCategories.prototype, "name", void 0);
|
|
26
|
+
exports.HelpContentCategories = HelpContentCategories = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ name: 'help_content_categories' }),
|
|
28
|
+
__metadata("design:paramtypes", [String])
|
|
29
|
+
], HelpContentCategories);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class HelpContent extends BaseModel {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category_Id: number;
|
|
6
|
+
service_Id: number;
|
|
7
|
+
sub_service_Id: number;
|
|
8
|
+
department_Id: number;
|
|
9
|
+
constructor(title: string, description: string, category_Id: number, service_Id: number, sub_service_Id: number, department_Id: number);
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.HelpContent = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContent = class HelpContent extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(title, description, category_Id, service_Id, sub_service_Id, department_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.title = title,
|
|
19
|
+
this.description = description,
|
|
20
|
+
this.category_Id = category_Id,
|
|
21
|
+
this.service_Id = service_Id,
|
|
22
|
+
this.sub_service_Id = sub_service_Id,
|
|
23
|
+
this.department_Id = department_Id;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.HelpContent = HelpContent;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "text", nullable: false }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], HelpContent.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], HelpContent.prototype, "description", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], HelpContent.prototype, "category_Id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], HelpContent.prototype, "service_Id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], HelpContent.prototype, "sub_service_Id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], HelpContent.prototype, "department_Id", void 0);
|
|
51
|
+
exports.HelpContent = HelpContent = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'help_content' }),
|
|
53
|
+
__metadata("design:paramtypes", [String, String, Number, Number, Number, Number])
|
|
54
|
+
], HelpContent);
|
|
@@ -4,8 +4,5 @@ export declare class Faqs extends BaseModel {
|
|
|
4
4
|
answer: string;
|
|
5
5
|
category_Id: number;
|
|
6
6
|
sub_category_Id: number;
|
|
7
|
-
|
|
8
|
-
like_count: number;
|
|
9
|
-
dislike_count: number;
|
|
10
|
-
constructor(question: string, answer: string, category_Id: number, sub_category_Id: number, department_Id: number);
|
|
7
|
+
constructor(question: string, answer: string, category_Id: number, sub_category_Id: number);
|
|
11
8
|
}
|
package/dist/models/faqsModel.js
CHANGED
|
@@ -13,13 +13,12 @@ exports.Faqs = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let Faqs = class Faqs extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(question, answer, category_Id, sub_category_Id
|
|
16
|
+
constructor(question, answer, category_Id, sub_category_Id) {
|
|
17
17
|
super();
|
|
18
18
|
this.question = question,
|
|
19
19
|
this.answer = answer,
|
|
20
20
|
this.category_Id = category_Id,
|
|
21
|
-
this.sub_category_Id = sub_category_Id
|
|
22
|
-
this.department_Id = department_Id;
|
|
21
|
+
this.sub_category_Id = sub_category_Id;
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
exports.Faqs = Faqs;
|
|
@@ -39,19 +38,7 @@ __decorate([
|
|
|
39
38
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
39
|
__metadata("design:type", Number)
|
|
41
40
|
], Faqs.prototype, "sub_category_Id", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], Faqs.prototype, "department_Id", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ nullable: true, default: 0 }),
|
|
48
|
-
__metadata("design:type", Number)
|
|
49
|
-
], Faqs.prototype, "like_count", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ nullable: true, default: 0 }),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], Faqs.prototype, "dislike_count", void 0);
|
|
54
41
|
exports.Faqs = Faqs = __decorate([
|
|
55
42
|
(0, typeorm_1.Entity)({ name: 'faqs' }),
|
|
56
|
-
__metadata("design:paramtypes", [String, String, Number, Number
|
|
43
|
+
__metadata("design:paramtypes", [String, String, Number, Number])
|
|
57
44
|
], Faqs);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { Division } from './models/DivisionModel';
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
import { Faqs } from './models/faqsModel';
|
|
27
|
-
import {
|
|
27
|
+
import { FaqsReactions } from './models/FaqsReactionsModel';
|
|
28
28
|
import { Conversation } from './models/ConversationModel';
|
|
29
29
|
import { ConversationParticipant } from './models/ConversationParticipantModel';
|
|
30
30
|
import { Message } from './models/MessageModel';
|
|
@@ -39,6 +39,9 @@ import { PostAttachments } from './models/PostAttachmentsModel';
|
|
|
39
39
|
import { PostReactions } from './models/PostReactionsModel';
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
import { HelpContent } from './models/HelpContentModel';
|
|
43
|
+
import { HelpContentCategories } from './models/HelpContentCategoryModel';
|
|
44
|
+
import { HelpContentAttachments } from './models/HelpContentAttachmentModel';
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
export const AppDataSource = new DataSource({
|
|
@@ -71,7 +74,7 @@ export const AppDataSource = new DataSource({
|
|
|
71
74
|
Departments,
|
|
72
75
|
Division,
|
|
73
76
|
Faqs,
|
|
74
|
-
|
|
77
|
+
FaqsReactions,
|
|
75
78
|
Conversation,
|
|
76
79
|
ConversationParticipant,
|
|
77
80
|
Message,
|
|
@@ -83,6 +86,9 @@ export const AppDataSource = new DataSource({
|
|
|
83
86
|
Posts,
|
|
84
87
|
Comments,
|
|
85
88
|
PostAttachments,
|
|
86
|
-
PostReactions
|
|
89
|
+
PostReactions,
|
|
90
|
+
HelpContent,
|
|
91
|
+
HelpContentCategories,
|
|
92
|
+
HelpContentAttachments
|
|
87
93
|
],
|
|
88
94
|
});
|
package/src/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ export * from './models/DesignationModel';
|
|
|
18
18
|
export * from './models/DepartmentsModel';
|
|
19
19
|
export * from './models/DivisionModel';
|
|
20
20
|
export * from './models/faqsModel';
|
|
21
|
-
export * from './models/
|
|
21
|
+
export * from './models/FaqsReactionsModel';
|
|
22
22
|
export * from './models/ConversationModel';
|
|
23
23
|
export * from './models/ConversationParticipantModel';
|
|
24
24
|
export * from './models/MessageModel';
|
|
@@ -31,3 +31,6 @@ export * from './models/PostsModel';
|
|
|
31
31
|
export * from './models/CommentsModel';
|
|
32
32
|
export * from './models/PostAttachmentsModel';
|
|
33
33
|
export * from './models/PostReactionsModel';
|
|
34
|
+
export * from './models/HelpContentModel';
|
|
35
|
+
export * from './models/HelpContentCategoryModel';
|
|
36
|
+
export * from './models/HelpContentAttachmentModel';
|
|
@@ -18,6 +18,9 @@ export class ConversationParticipant extends BaseModel {
|
|
|
18
18
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
19
19
|
joinedAt: Date;
|
|
20
20
|
|
|
21
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
22
|
+
lastReadAt?: Date;
|
|
23
|
+
|
|
21
24
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
22
25
|
createdAt: Date;
|
|
23
26
|
|
|
@@ -37,6 +40,7 @@ export class ConversationParticipant extends BaseModel {
|
|
|
37
40
|
userId?: number,
|
|
38
41
|
roleId?: number,
|
|
39
42
|
joinedAt?: Date,
|
|
43
|
+
lastReadAt?: Date,
|
|
40
44
|
createdAt?: Date,
|
|
41
45
|
updatedAt?: Date
|
|
42
46
|
) {
|
|
@@ -45,6 +49,7 @@ export class ConversationParticipant extends BaseModel {
|
|
|
45
49
|
this.userId = userId || 0;
|
|
46
50
|
this.roleId = roleId || 0;
|
|
47
51
|
this.joinedAt = joinedAt || new Date();
|
|
52
|
+
this.lastReadAt = lastReadAt;
|
|
48
53
|
this.createdAt = createdAt || new Date();
|
|
49
54
|
this.updatedAt = updatedAt;
|
|
50
55
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum ReactionType {
|
|
5
|
+
LIKE = 'like',
|
|
6
|
+
DISLIKE = 'dislike'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'faqs_reactions' })
|
|
10
|
+
export class FaqsReactions extends BaseModel {
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: false })
|
|
16
|
+
question_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({
|
|
19
|
+
type: 'enum',
|
|
20
|
+
enum: ReactionType,
|
|
21
|
+
nullable: false
|
|
22
|
+
})
|
|
23
|
+
reaction: ReactionType;
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
user_id: number,
|
|
27
|
+
question_id: number,
|
|
28
|
+
reaction: ReactionType,
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.user_id = user_id,
|
|
32
|
+
this.question_id = question_id,
|
|
33
|
+
this.reaction = reaction
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity, BeforeInsert, BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'help_content_attachments' })
|
|
6
|
+
export class HelpContentAttachments extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
help_content_Id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: false })
|
|
12
|
+
attachment_url: string;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: false })
|
|
15
|
+
attachment_name: string;
|
|
16
|
+
|
|
17
|
+
constructor(
|
|
18
|
+
help_content_Id: number,
|
|
19
|
+
attachment_url: string,
|
|
20
|
+
attachment_name: string,
|
|
21
|
+
) {
|
|
22
|
+
super();
|
|
23
|
+
this.help_content_Id = help_content_Id,
|
|
24
|
+
this.attachment_url = attachment_url,
|
|
25
|
+
this.attachment_name = attachment_name
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'help_content_categories' })
|
|
6
|
+
export class HelpContentCategories extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
constructor(
|
|
12
|
+
name: string,
|
|
13
|
+
) {
|
|
14
|
+
super();
|
|
15
|
+
this.name = name
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity, BeforeInsert, BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'help_content' })
|
|
6
|
+
export class HelpContent extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: "text", nullable: false })
|
|
9
|
+
title: string;
|
|
10
|
+
|
|
11
|
+
@Column({ type: "text", nullable: true })
|
|
12
|
+
description: string;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: true })
|
|
15
|
+
category_Id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ nullable: true })
|
|
18
|
+
service_Id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ nullable: true })
|
|
21
|
+
sub_service_Id: number;
|
|
22
|
+
|
|
23
|
+
@Column({ nullable: true })
|
|
24
|
+
department_Id: number;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
title: string,
|
|
28
|
+
description: string,
|
|
29
|
+
category_Id: number,
|
|
30
|
+
service_Id: number,
|
|
31
|
+
sub_service_Id: number,
|
|
32
|
+
department_Id: number,
|
|
33
|
+
) {
|
|
34
|
+
super();
|
|
35
|
+
this.title = title,
|
|
36
|
+
this.description = description,
|
|
37
|
+
this.category_Id = category_Id,
|
|
38
|
+
this.service_Id = service_Id,
|
|
39
|
+
this.sub_service_Id = sub_service_Id,
|
|
40
|
+
this.department_Id = department_Id
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/models/faqsModel.ts
CHANGED
|
@@ -17,27 +17,17 @@ export class Faqs extends BaseModel {
|
|
|
17
17
|
@Column({ nullable: true })
|
|
18
18
|
sub_category_Id: number;
|
|
19
19
|
|
|
20
|
-
@Column({ nullable: true })
|
|
21
|
-
department_Id: number;
|
|
22
|
-
|
|
23
|
-
@Column({ nullable: true, default: 0 })
|
|
24
|
-
like_count: number;
|
|
25
|
-
|
|
26
|
-
@Column({ nullable: true, default: 0 })
|
|
27
|
-
dislike_count: number;
|
|
28
|
-
|
|
29
20
|
constructor(
|
|
30
21
|
question: string,
|
|
31
22
|
answer: string,
|
|
32
23
|
category_Id: number,
|
|
33
24
|
sub_category_Id: number,
|
|
34
|
-
department_Id: number,
|
|
35
25
|
) {
|
|
36
26
|
super();
|
|
37
27
|
this.question = question,
|
|
38
28
|
this.answer = answer,
|
|
39
|
-
this.category_Id = category_Id
|
|
40
|
-
this.sub_category_Id = sub_category_Id
|
|
41
|
-
|
|
29
|
+
this.category_Id = category_Id,
|
|
30
|
+
this.sub_category_Id = sub_category_Id
|
|
31
|
+
|
|
42
32
|
}
|
|
43
33
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'question_tags' })
|
|
6
|
-
export class QuestionTags extends BaseModel {
|
|
7
|
-
|
|
8
|
-
@Column({ nullable: true })
|
|
9
|
-
name: string;
|
|
10
|
-
|
|
11
|
-
@Column({ nullable: true })
|
|
12
|
-
question_Id: number;
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
name: string,
|
|
16
|
-
question_Id: number
|
|
17
|
-
) {
|
|
18
|
-
super();
|
|
19
|
-
this.name = name,
|
|
20
|
-
this.question_Id = question_Id
|
|
21
|
-
}
|
|
22
|
-
}
|