@platform-modules/foreign-ministry 1.0.32 → 1.0.34
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 +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/feedbackModel.d.ts +16 -0
- package/dist/models/feedbackModel.js +61 -0
- package/package.json +1 -1
- package/src/data-source.ts +3 -1
- package/src/index.ts +1 -0
- package/src/models/feedbackModel.ts +49 -0
package/dist/data-source.js
CHANGED
|
@@ -32,6 +32,7 @@ const MessageModel_1 = require("./models/MessageModel");
|
|
|
32
32
|
const FMServices_1 = require("./models/FMServices");
|
|
33
33
|
const FMSubservices_1 = require("./models/FMSubservices");
|
|
34
34
|
const serviceBookmarksModel_1 = require("./models/serviceBookmarksModel");
|
|
35
|
+
const feedbackModel_1 = require("./models/feedbackModel");
|
|
35
36
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
36
37
|
type: 'postgres',
|
|
37
38
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -68,6 +69,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
68
69
|
MessageModel_1.Message,
|
|
69
70
|
FMServices_1.FMServices,
|
|
70
71
|
FMSubservices_1.FMSubServices,
|
|
71
|
-
serviceBookmarksModel_1.ServiceBookmarks
|
|
72
|
+
serviceBookmarksModel_1.ServiceBookmarks,
|
|
73
|
+
feedbackModel_1.Feedback
|
|
72
74
|
],
|
|
73
75
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -41,3 +41,4 @@ __exportStar(require("./models/MessageModel"), exports);
|
|
|
41
41
|
__exportStar(require("./models/FMServices"), exports);
|
|
42
42
|
__exportStar(require("./models/FMSubservices"), exports);
|
|
43
43
|
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
44
|
+
__exportStar(require("./models/feedbackModel"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum Rating {
|
|
3
|
+
ONE = 1,
|
|
4
|
+
TWO = 2,
|
|
5
|
+
THREE = 3,
|
|
6
|
+
FOUR = 4,
|
|
7
|
+
FIVE = 5
|
|
8
|
+
}
|
|
9
|
+
export declare class Feedback extends BaseModel {
|
|
10
|
+
comment: string;
|
|
11
|
+
rating: Rating;
|
|
12
|
+
category_Id: number;
|
|
13
|
+
sub_category_Id: number;
|
|
14
|
+
user_Id: number;
|
|
15
|
+
constructor(comment: string, rating: Rating, category_Id: number, sub_category_Id: number, user_Id: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.Feedback = exports.Rating = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var Rating;
|
|
16
|
+
(function (Rating) {
|
|
17
|
+
Rating[Rating["ONE"] = 1] = "ONE";
|
|
18
|
+
Rating[Rating["TWO"] = 2] = "TWO";
|
|
19
|
+
Rating[Rating["THREE"] = 3] = "THREE";
|
|
20
|
+
Rating[Rating["FOUR"] = 4] = "FOUR";
|
|
21
|
+
Rating[Rating["FIVE"] = 5] = "FIVE";
|
|
22
|
+
})(Rating || (exports.Rating = Rating = {}));
|
|
23
|
+
let Feedback = class Feedback extends BaseModel_1.BaseModel {
|
|
24
|
+
constructor(comment, rating, category_Id, sub_category_Id, user_Id) {
|
|
25
|
+
super();
|
|
26
|
+
this.comment = comment,
|
|
27
|
+
this.rating = rating,
|
|
28
|
+
this.category_Id = category_Id,
|
|
29
|
+
this.sub_category_Id = sub_category_Id,
|
|
30
|
+
this.user_Id = user_Id;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.Feedback = Feedback;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Feedback.prototype, "comment", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({
|
|
40
|
+
type: "enum",
|
|
41
|
+
enum: Rating,
|
|
42
|
+
nullable: true,
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Feedback.prototype, "rating", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], Feedback.prototype, "category_Id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Feedback.prototype, "sub_category_Id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], Feedback.prototype, "user_Id", void 0);
|
|
58
|
+
exports.Feedback = Feedback = __decorate([
|
|
59
|
+
(0, typeorm_1.Entity)({ name: 'feedback' }),
|
|
60
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number])
|
|
61
|
+
], Feedback);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { Message } from './models/MessageModel';
|
|
|
31
31
|
import { FMServices } from './models/FMServices';
|
|
32
32
|
import { FMSubServices } from './models/FMSubservices';
|
|
33
33
|
import { ServiceBookmarks } from './models/serviceBookmarksModel';
|
|
34
|
+
import { Feedback } from './models/feedbackModel';
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
export const AppDataSource = new DataSource({
|
|
@@ -69,6 +70,7 @@ export const AppDataSource = new DataSource({
|
|
|
69
70
|
Message,
|
|
70
71
|
FMServices,
|
|
71
72
|
FMSubServices,
|
|
72
|
-
ServiceBookmarks
|
|
73
|
+
ServiceBookmarks,
|
|
74
|
+
Feedback
|
|
73
75
|
],
|
|
74
76
|
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity, BeforeInsert, BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
export enum Rating {
|
|
6
|
+
ONE = 1,
|
|
7
|
+
TWO = 2,
|
|
8
|
+
THREE = 3,
|
|
9
|
+
FOUR = 4,
|
|
10
|
+
FIVE = 5,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'feedback' })
|
|
14
|
+
export class Feedback extends BaseModel {
|
|
15
|
+
|
|
16
|
+
@Column({ nullable: true })
|
|
17
|
+
comment: string;
|
|
18
|
+
|
|
19
|
+
@Column({
|
|
20
|
+
type: "enum",
|
|
21
|
+
enum: Rating,
|
|
22
|
+
nullable: true,
|
|
23
|
+
})
|
|
24
|
+
rating: Rating;
|
|
25
|
+
|
|
26
|
+
@Column({ nullable: true })
|
|
27
|
+
category_Id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ nullable: true })
|
|
30
|
+
sub_category_Id: number;
|
|
31
|
+
|
|
32
|
+
@Column({ nullable: true })
|
|
33
|
+
user_Id: number;
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
comment: string,
|
|
37
|
+
rating: Rating,
|
|
38
|
+
category_Id: number,
|
|
39
|
+
sub_category_Id: number,
|
|
40
|
+
user_Id: number,
|
|
41
|
+
) {
|
|
42
|
+
super();
|
|
43
|
+
this.comment = comment,
|
|
44
|
+
this.rating = rating,
|
|
45
|
+
this.category_Id = category_Id,
|
|
46
|
+
this.sub_category_Id = sub_category_Id,
|
|
47
|
+
this.user_Id = user_Id
|
|
48
|
+
}
|
|
49
|
+
}
|