@platform-modules/foreign-ministry 1.0.35 → 1.0.37
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 +2 -2
- package/dist/data-source.js +8 -12
- package/dist/index.d.ts +5 -6
- package/dist/index.js +5 -6
- package/dist/models/CategoriesModel.d.ts +6 -0
- package/dist/models/{HelpContentTagsModel.js → CategoriesModel.js} +16 -11
- package/dist/models/CommentsModel.d.ts +16 -0
- package/dist/models/CommentsModel.js +75 -0
- package/dist/models/PostAttachmentsModel.d.ts +9 -0
- package/dist/models/PostAttachmentsModel.js +45 -0
- package/dist/models/PostReactionsModel.d.ts +12 -0
- package/dist/models/PostReactionsModel.js +56 -0
- package/dist/models/PostsModel.d.ts +21 -0
- package/dist/models/PostsModel.js +87 -0
- package/package.json +1 -1
- package/src/data-source.ts +10 -12
- package/src/index.ts +5 -6
- package/src/models/CategoriesModel.ts +18 -0
- package/src/models/CommentsModel.ts +52 -0
- package/src/models/PostAttachmentsModel.ts +28 -0
- package/src/models/PostReactionsModel.ts +37 -0
- package/src/models/PostsModel.ts +62 -0
- package/dist/models/HelpContentAttachmentModel.d.ts +0 -7
- package/dist/models/HelpContentAttachmentModel.js +0 -39
- package/dist/models/HelpContentCategoryModel.d.ts +0 -5
- package/dist/models/HelpContentCategoryModel.js +0 -29
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
- package/dist/models/HelpContentMappedCategoriesModel.js +0 -34
- package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.js +0 -34
- package/dist/models/HelpContentModel.d.ts +0 -10
- package/dist/models/HelpContentModel.js +0 -54
- package/dist/models/HelpContentTagsModel.d.ts +0 -5
- package/src/models/HelpContentAttachmentModel.ts +0 -27
- package/src/models/HelpContentCategoryModel.ts +0 -17
- package/src/models/HelpContentMappedCategoriesModel.ts +0 -22
- package/src/models/HelpContentMappedTagsModel.ts +0 -22
- package/src/models/HelpContentModel.ts +0 -42
- package/src/models/HelpContentTagsModel.ts +0 -17
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -33,12 +33,10 @@ const FMServices_1 = require("./models/FMServices");
|
|
|
33
33
|
const FMSubservices_1 = require("./models/FMSubservices");
|
|
34
34
|
const serviceBookmarksModel_1 = require("./models/serviceBookmarksModel");
|
|
35
35
|
const feedbackModel_1 = require("./models/feedbackModel");
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const HelpContentCategoryModel_1 = require("./models/HelpContentCategoryModel");
|
|
41
|
-
const HelpContentAttachmentModel_1 = require("./models/HelpContentAttachmentModel");
|
|
36
|
+
const CategoriesModel_1 = require("./models/CategoriesModel");
|
|
37
|
+
const PostsModel_1 = require("./models/PostsModel");
|
|
38
|
+
const CommentsModel_1 = require("./models/CommentsModel");
|
|
39
|
+
const PostAttachmentsModel_1 = require("./models/PostAttachmentsModel");
|
|
42
40
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
43
41
|
type: 'postgres',
|
|
44
42
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -77,11 +75,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
77
75
|
FMSubservices_1.FMSubServices,
|
|
78
76
|
serviceBookmarksModel_1.ServiceBookmarks,
|
|
79
77
|
feedbackModel_1.Feedback,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
HelpContentCategoryModel_1.HelpContentCategories,
|
|
85
|
-
HelpContentAttachmentModel_1.HelpContentAttachments
|
|
78
|
+
CategoriesModel_1.Categories,
|
|
79
|
+
PostsModel_1.Posts,
|
|
80
|
+
CommentsModel_1.Comments,
|
|
81
|
+
PostAttachmentsModel_1.PostAttachments
|
|
86
82
|
],
|
|
87
83
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -26,9 +26,8 @@ export * from './models/FMServices';
|
|
|
26
26
|
export * from './models/FMSubservices';
|
|
27
27
|
export * from './models/serviceBookmarksModel';
|
|
28
28
|
export * from './models/feedbackModel';
|
|
29
|
-
export * from './models/
|
|
30
|
-
export * from './models/
|
|
31
|
-
export * from './models/
|
|
32
|
-
export * from './models/
|
|
33
|
-
export * from './models/
|
|
34
|
-
export * from './models/HelpContentAttachmentModel';
|
|
29
|
+
export * from './models/CategoriesModel';
|
|
30
|
+
export * from './models/PostsModel';
|
|
31
|
+
export * from './models/CommentsModel';
|
|
32
|
+
export * from './models/PostAttachmentsModel';
|
|
33
|
+
export * from './models/PostReactionsModel';
|
package/dist/index.js
CHANGED
|
@@ -42,9 +42,8 @@ __exportStar(require("./models/FMServices"), exports);
|
|
|
42
42
|
__exportStar(require("./models/FMSubservices"), exports);
|
|
43
43
|
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
44
44
|
__exportStar(require("./models/feedbackModel"), exports);
|
|
45
|
-
__exportStar(require("./models/
|
|
46
|
-
__exportStar(require("./models/
|
|
47
|
-
__exportStar(require("./models/
|
|
48
|
-
__exportStar(require("./models/
|
|
49
|
-
__exportStar(require("./models/
|
|
50
|
-
__exportStar(require("./models/HelpContentAttachmentModel"), exports);
|
|
45
|
+
__exportStar(require("./models/CategoriesModel"), exports);
|
|
46
|
+
__exportStar(require("./models/PostsModel"), exports);
|
|
47
|
+
__exportStar(require("./models/CommentsModel"), exports);
|
|
48
|
+
__exportStar(require("./models/PostAttachmentsModel"), exports);
|
|
49
|
+
__exportStar(require("./models/PostReactionsModel"), exports);
|
|
@@ -9,21 +9,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.Categories = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(
|
|
15
|
+
let Categories = class Categories extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor() {
|
|
17
17
|
super();
|
|
18
|
-
this.name =
|
|
18
|
+
this.name = '';
|
|
19
|
+
this.description = '';
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
exports.
|
|
22
|
+
exports.Categories = Categories;
|
|
22
23
|
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 150, nullable: false, unique: true }),
|
|
24
25
|
__metadata("design:type", String)
|
|
25
|
-
],
|
|
26
|
-
|
|
27
|
-
(0, typeorm_1.
|
|
28
|
-
__metadata("design:
|
|
29
|
-
],
|
|
26
|
+
], Categories.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Categories.prototype, "description", void 0);
|
|
31
|
+
exports.Categories = Categories = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'categories' }),
|
|
33
|
+
__metadata("design:paramtypes", [])
|
|
34
|
+
], Categories);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { Posts } from './PostsModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export declare class Comments extends BaseModel {
|
|
5
|
+
post_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
parent_comment_id?: number;
|
|
8
|
+
content: string;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
11
|
+
post?: Posts;
|
|
12
|
+
user?: User;
|
|
13
|
+
parentComment?: Comments;
|
|
14
|
+
replies?: Comments[];
|
|
15
|
+
constructor();
|
|
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.Comments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const PostsModel_1 = require("./PostsModel");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
let Comments = class Comments extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.post_id = 0;
|
|
21
|
+
this.user_id = 0;
|
|
22
|
+
this.parent_comment_id = 0;
|
|
23
|
+
this.content = '';
|
|
24
|
+
this.created_at = new Date();
|
|
25
|
+
this.updated_at = new Date();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.Comments = Comments;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Comments.prototype, "post_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], Comments.prototype, "user_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Comments.prototype, "parent_comment_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Comments.prototype, "content", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], Comments.prototype, "created_at", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], Comments.prototype, "updated_at", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.ManyToOne)(() => PostsModel_1.Posts, post => post.id),
|
|
55
|
+
(0, typeorm_1.JoinColumn)({ name: 'post_id' }),
|
|
56
|
+
__metadata("design:type", PostsModel_1.Posts)
|
|
57
|
+
], Comments.prototype, "post", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User, user => user.id),
|
|
60
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
61
|
+
__metadata("design:type", user_1.User)
|
|
62
|
+
], Comments.prototype, "user", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.ManyToOne)(() => Comments, comment => comment.id),
|
|
65
|
+
(0, typeorm_1.JoinColumn)({ name: 'parent_comment_id' }),
|
|
66
|
+
__metadata("design:type", Comments)
|
|
67
|
+
], Comments.prototype, "parentComment", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.OneToMany)(() => Comments, comment => comment.parentComment),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], Comments.prototype, "replies", void 0);
|
|
72
|
+
exports.Comments = Comments = __decorate([
|
|
73
|
+
(0, typeorm_1.Entity)({ name: 'comments' }),
|
|
74
|
+
__metadata("design:paramtypes", [])
|
|
75
|
+
], Comments);
|
|
@@ -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.PostAttachments = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const PostsModel_1 = require("./PostsModel");
|
|
16
|
+
let PostAttachments = class PostAttachments extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.post_id = 0;
|
|
20
|
+
this.file_url = '';
|
|
21
|
+
this.uploaded_at = new Date();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.PostAttachments = PostAttachments;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], PostAttachments.prototype, "post_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], PostAttachments.prototype, "file_url", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], PostAttachments.prototype, "uploaded_at", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => PostsModel_1.Posts, post => post.id),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'post_id' }),
|
|
40
|
+
__metadata("design:type", PostsModel_1.Posts)
|
|
41
|
+
], PostAttachments.prototype, "post", void 0);
|
|
42
|
+
exports.PostAttachments = PostAttachments = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: 'post_attachments' }),
|
|
44
|
+
__metadata("design:paramtypes", [])
|
|
45
|
+
], PostAttachments);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { Posts } from './PostsModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export declare class PostReactions extends BaseModel {
|
|
5
|
+
post_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
reaction_type: string;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
post?: Posts;
|
|
10
|
+
user?: User;
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.PostReactions = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const PostsModel_1 = require("./PostsModel");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
let PostReactions = class PostReactions extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.post_id = 0;
|
|
21
|
+
this.user_id = 0;
|
|
22
|
+
this.reaction_type = '';
|
|
23
|
+
this.created_at = new Date();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.PostReactions = PostReactions;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], PostReactions.prototype, "post_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], PostReactions.prototype, "user_id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: false }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], PostReactions.prototype, "reaction_type", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], PostReactions.prototype, "created_at", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.ManyToOne)(() => PostsModel_1.Posts, post => post.id),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: 'post_id' }),
|
|
46
|
+
__metadata("design:type", PostsModel_1.Posts)
|
|
47
|
+
], PostReactions.prototype, "post", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User, user => user.id),
|
|
50
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
51
|
+
__metadata("design:type", user_1.User)
|
|
52
|
+
], PostReactions.prototype, "user", void 0);
|
|
53
|
+
exports.PostReactions = PostReactions = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)({ name: 'post_reactions' }),
|
|
55
|
+
__metadata("design:paramtypes", [])
|
|
56
|
+
], PostReactions);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { User } from './user';
|
|
3
|
+
import { Departments } from './DepartmentsModel';
|
|
4
|
+
import { Categories } from './CategoriesModel';
|
|
5
|
+
import { Comments } from './CommentsModel';
|
|
6
|
+
import { PostAttachments } from './PostAttachmentsModel';
|
|
7
|
+
export declare class Posts extends BaseModel {
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
user_id?: number;
|
|
11
|
+
department_id?: number;
|
|
12
|
+
category_id?: number;
|
|
13
|
+
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
15
|
+
user?: User;
|
|
16
|
+
department?: Departments;
|
|
17
|
+
category?: Categories;
|
|
18
|
+
comments?: Comments[];
|
|
19
|
+
attachments?: PostAttachments[];
|
|
20
|
+
constructor();
|
|
21
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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.Posts = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const user_1 = require("./user");
|
|
16
|
+
const DepartmentsModel_1 = require("./DepartmentsModel");
|
|
17
|
+
const CategoriesModel_1 = require("./CategoriesModel");
|
|
18
|
+
const CommentsModel_1 = require("./CommentsModel");
|
|
19
|
+
const PostAttachmentsModel_1 = require("./PostAttachmentsModel");
|
|
20
|
+
let Posts = class Posts extends BaseModel_1.BaseModel {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.title = '';
|
|
24
|
+
this.content = '';
|
|
25
|
+
this.user_id = 0;
|
|
26
|
+
this.department_id = 0;
|
|
27
|
+
this.category_id = 0;
|
|
28
|
+
this.created_at = new Date();
|
|
29
|
+
this.updated_at = new Date();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.Posts = Posts;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Posts.prototype, "title", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Posts.prototype, "content", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], Posts.prototype, "user_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], Posts.prototype, "department_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], Posts.prototype, "category_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], Posts.prototype, "created_at", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], Posts.prototype, "updated_at", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User, user => user.id),
|
|
63
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
64
|
+
__metadata("design:type", user_1.User)
|
|
65
|
+
], Posts.prototype, "user", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.ManyToOne)(() => DepartmentsModel_1.Departments, department => department.id),
|
|
68
|
+
(0, typeorm_1.JoinColumn)({ name: 'department_id' }),
|
|
69
|
+
__metadata("design:type", DepartmentsModel_1.Departments)
|
|
70
|
+
], Posts.prototype, "department", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.ManyToOne)(() => CategoriesModel_1.Categories, category => category.id),
|
|
73
|
+
(0, typeorm_1.JoinColumn)({ name: 'category_id' }),
|
|
74
|
+
__metadata("design:type", CategoriesModel_1.Categories)
|
|
75
|
+
], Posts.prototype, "category", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.OneToMany)(() => CommentsModel_1.Comments, comment => comment.post),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], Posts.prototype, "comments", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.OneToMany)(() => PostAttachmentsModel_1.PostAttachments, attachment => attachment.post),
|
|
82
|
+
__metadata("design:type", Array)
|
|
83
|
+
], Posts.prototype, "attachments", void 0);
|
|
84
|
+
exports.Posts = Posts = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)({ name: 'posts' }),
|
|
86
|
+
__metadata("design:paramtypes", [])
|
|
87
|
+
], Posts);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -32,12 +32,12 @@ import { FMServices } from './models/FMServices';
|
|
|
32
32
|
import { FMSubServices } from './models/FMSubservices';
|
|
33
33
|
import { ServiceBookmarks } from './models/serviceBookmarksModel';
|
|
34
34
|
import { Feedback } from './models/feedbackModel';
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
import { Categories } from './models/CategoriesModel';
|
|
36
|
+
import { Posts } from './models/PostsModel';
|
|
37
|
+
import { Comments } from './models/CommentsModel';
|
|
38
|
+
import { PostAttachments } from './models/PostAttachmentsModel';
|
|
39
|
+
|
|
40
|
+
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
export const AppDataSource = new DataSource({
|
|
@@ -78,11 +78,9 @@ export const AppDataSource = new DataSource({
|
|
|
78
78
|
FMSubServices,
|
|
79
79
|
ServiceBookmarks,
|
|
80
80
|
Feedback,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
HelpContentCategories,
|
|
86
|
-
HelpContentAttachments
|
|
81
|
+
Categories,
|
|
82
|
+
Posts,
|
|
83
|
+
Comments,
|
|
84
|
+
PostAttachments
|
|
87
85
|
],
|
|
88
86
|
});
|
package/src/index.ts
CHANGED
|
@@ -26,9 +26,8 @@ export * from './models/FMServices';
|
|
|
26
26
|
export * from './models/FMSubservices';
|
|
27
27
|
export * from './models/serviceBookmarksModel';
|
|
28
28
|
export * from './models/feedbackModel';
|
|
29
|
-
export * from './models/
|
|
30
|
-
export * from './models/
|
|
31
|
-
export * from './models/
|
|
32
|
-
export * from './models/
|
|
33
|
-
export * from './models/
|
|
34
|
-
export * from './models/HelpContentAttachmentModel';
|
|
29
|
+
export * from './models/CategoriesModel';
|
|
30
|
+
export * from './models/PostsModel';
|
|
31
|
+
export * from './models/CommentsModel';
|
|
32
|
+
export * from './models/PostAttachmentsModel';
|
|
33
|
+
export * from './models/PostReactionsModel';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'categories' })
|
|
5
|
+
export class Categories extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'varchar', length: 150, nullable: false, unique: true })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'text', nullable: true })
|
|
11
|
+
description?: string;
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.name = '';
|
|
16
|
+
this.description = '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Posts } from './PostsModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'comments' })
|
|
7
|
+
export class Comments extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int', nullable: false })
|
|
10
|
+
post_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'int', nullable: true })
|
|
16
|
+
parent_comment_id?: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'text', nullable: false })
|
|
19
|
+
content: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
22
|
+
created_at: Date;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
25
|
+
updated_at: Date;
|
|
26
|
+
|
|
27
|
+
// Relations
|
|
28
|
+
@ManyToOne(() => Posts, post => post.id)
|
|
29
|
+
@JoinColumn({ name: 'post_id' })
|
|
30
|
+
post?: Posts;
|
|
31
|
+
|
|
32
|
+
@ManyToOne(() => User, user => user.id)
|
|
33
|
+
@JoinColumn({ name: 'user_id' })
|
|
34
|
+
user?: User;
|
|
35
|
+
|
|
36
|
+
@ManyToOne(() => Comments, comment => comment.id)
|
|
37
|
+
@JoinColumn({ name: 'parent_comment_id' })
|
|
38
|
+
parentComment?: Comments;
|
|
39
|
+
|
|
40
|
+
@OneToMany(() => Comments, comment => comment.parentComment)
|
|
41
|
+
replies?: Comments[];
|
|
42
|
+
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.post_id = 0;
|
|
46
|
+
this.user_id = 0;
|
|
47
|
+
this.parent_comment_id = 0;
|
|
48
|
+
this.content = '';
|
|
49
|
+
this.created_at = new Date();
|
|
50
|
+
this.updated_at = new Date();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Posts } from './PostsModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'post_attachments' })
|
|
6
|
+
export class PostAttachments extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'int', nullable: false })
|
|
9
|
+
post_id: number;
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'text', nullable: false })
|
|
12
|
+
file_url: string;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
15
|
+
uploaded_at: Date;
|
|
16
|
+
|
|
17
|
+
// Relations
|
|
18
|
+
@ManyToOne(() => Posts, post => post.id)
|
|
19
|
+
@JoinColumn({ name: 'post_id' })
|
|
20
|
+
post?: Posts;
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.post_id = 0;
|
|
25
|
+
this.file_url = '';
|
|
26
|
+
this.uploaded_at = new Date();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { Posts } from './PostsModel';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
@Entity({ name: 'post_reactions' })
|
|
7
|
+
export class PostReactions extends BaseModel {
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int', nullable: false })
|
|
10
|
+
post_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'int', nullable: false })
|
|
13
|
+
user_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
16
|
+
reaction_type: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
19
|
+
created_at: Date;
|
|
20
|
+
|
|
21
|
+
// Relations
|
|
22
|
+
@ManyToOne(() => Posts, post => post.id)
|
|
23
|
+
@JoinColumn({ name: 'post_id' })
|
|
24
|
+
post?: Posts;
|
|
25
|
+
|
|
26
|
+
@ManyToOne(() => User, user => user.id)
|
|
27
|
+
@JoinColumn({ name: 'user_id' })
|
|
28
|
+
user?: User;
|
|
29
|
+
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this.post_id = 0;
|
|
33
|
+
this.user_id = 0;
|
|
34
|
+
this.reaction_type = '';
|
|
35
|
+
this.created_at = new Date();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Column, Entity, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
import { Departments } from './DepartmentsModel';
|
|
5
|
+
import { Categories } from './CategoriesModel';
|
|
6
|
+
import { Comments } from './CommentsModel';
|
|
7
|
+
import { PostAttachments } from './PostAttachmentsModel';
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'posts' })
|
|
10
|
+
export class Posts extends BaseModel {
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
13
|
+
title: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'text', nullable: false })
|
|
16
|
+
content: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
user_id?: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int', nullable: true })
|
|
22
|
+
department_id?: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
category_id?: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
28
|
+
created_at: Date;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
31
|
+
updated_at: Date;
|
|
32
|
+
|
|
33
|
+
// Relations
|
|
34
|
+
@ManyToOne(() => User, user => user.id)
|
|
35
|
+
@JoinColumn({ name: 'user_id' })
|
|
36
|
+
user?: User;
|
|
37
|
+
|
|
38
|
+
@ManyToOne(() => Departments, department => department.id)
|
|
39
|
+
@JoinColumn({ name: 'department_id' })
|
|
40
|
+
department?: Departments;
|
|
41
|
+
|
|
42
|
+
@ManyToOne(() => Categories, category => category.id)
|
|
43
|
+
@JoinColumn({ name: 'category_id' })
|
|
44
|
+
category?: Categories;
|
|
45
|
+
|
|
46
|
+
@OneToMany(() => Comments, comment => comment.post)
|
|
47
|
+
comments?: Comments[];
|
|
48
|
+
|
|
49
|
+
@OneToMany(() => PostAttachments, attachment => attachment.post)
|
|
50
|
+
attachments?: PostAttachments[];
|
|
51
|
+
|
|
52
|
+
constructor() {
|
|
53
|
+
super();
|
|
54
|
+
this.title = '';
|
|
55
|
+
this.content = '';
|
|
56
|
+
this.user_id = 0;
|
|
57
|
+
this.department_id = 0;
|
|
58
|
+
this.category_id = 0;
|
|
59
|
+
this.created_at = new Date();
|
|
60
|
+
this.updated_at = new Date();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.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);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.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);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.HelpContentMappedCategories = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_category_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_category_Id = help_content_category_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedCategories);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.HelpContentMappedTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedTags);
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.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);
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'help_content_mapped_categories' })
|
|
6
|
-
export class HelpContentMappedCategories extends BaseModel {
|
|
7
|
-
|
|
8
|
-
@Column({ nullable: true })
|
|
9
|
-
help_content_category_Id: number;
|
|
10
|
-
|
|
11
|
-
@Column({ nullable: true })
|
|
12
|
-
help_content_Id: number;
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
help_content_category_Id: number,
|
|
16
|
-
help_content_Id: number
|
|
17
|
-
) {
|
|
18
|
-
super();
|
|
19
|
-
this.help_content_category_Id = help_content_category_Id,
|
|
20
|
-
this.help_content_Id = help_content_Id
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'help_content_mapped_tags' })
|
|
6
|
-
export class HelpContentMappedTags extends BaseModel {
|
|
7
|
-
|
|
8
|
-
@Column({ nullable: true })
|
|
9
|
-
help_content_tag_Id: number;
|
|
10
|
-
|
|
11
|
-
@Column({ nullable: true })
|
|
12
|
-
help_content_Id: number;
|
|
13
|
-
|
|
14
|
-
constructor(
|
|
15
|
-
help_content_tag_Id: number,
|
|
16
|
-
help_content_Id: number
|
|
17
|
-
) {
|
|
18
|
-
super();
|
|
19
|
-
this.help_content_tag_Id = help_content_tag_Id,
|
|
20
|
-
this.help_content_Id = help_content_Id
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
-
import { BaseModel } from './BaseModel';
|
|
4
|
-
|
|
5
|
-
@Entity({ name: 'help_content_tags' })
|
|
6
|
-
export class HelpContentTags 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
|
-
}
|