@platform-modules/foreign-ministry 1.1.30 → 1.1.32
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/models/FinancialChatsModel.d.ts +11 -1
- package/dist/models/FinancialChatsModel.js +27 -3
- package/dist/models/FinancialWorkFlowModel.d.ts +1 -0
- package/dist/models/FinancialWorkFlowModel.js +4 -0
- package/package.json +1 -1
- package/src/models/FinancialChatsModel.ts +21 -1
- package/src/models/FinancialWorkFlowModel.ts +4 -0
|
@@ -5,12 +5,22 @@ export declare enum statusEnum {
|
|
|
5
5
|
APPROVED = "Approved",
|
|
6
6
|
REJECTED = "Rejected"
|
|
7
7
|
}
|
|
8
|
+
export declare enum messageTypeEnum {
|
|
9
|
+
TEXT = "text",
|
|
10
|
+
IMAGE = "image",
|
|
11
|
+
AUDIO = "audio",
|
|
12
|
+
VIDEO = "video"
|
|
13
|
+
}
|
|
8
14
|
export declare class FinancialChats extends BaseModel {
|
|
9
15
|
financial_request_id: number;
|
|
10
16
|
content: string;
|
|
11
17
|
sender_user_id: number;
|
|
12
18
|
role_id: number | null;
|
|
13
19
|
status: statusEnum | null;
|
|
20
|
+
service_id: number | null;
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
message_type: messageTypeEnum | null;
|
|
23
|
+
sender_role_id: number | null;
|
|
14
24
|
financialRequest?: FinancialRequests;
|
|
15
|
-
constructor(financial_request_id: number, content: string, sender_user_id: number);
|
|
25
|
+
constructor(financial_request_id: number, content: string, sender_user_id: number, sender_role_id: number);
|
|
16
26
|
}
|
|
@@ -9,7 +9,7 @@ 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.FinancialChats = exports.statusEnum = void 0;
|
|
12
|
+
exports.FinancialChats = exports.messageTypeEnum = exports.statusEnum = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
|
|
@@ -19,12 +19,20 @@ var statusEnum;
|
|
|
19
19
|
statusEnum["APPROVED"] = "Approved";
|
|
20
20
|
statusEnum["REJECTED"] = "Rejected";
|
|
21
21
|
})(statusEnum || (exports.statusEnum = statusEnum = {}));
|
|
22
|
+
var messageTypeEnum;
|
|
23
|
+
(function (messageTypeEnum) {
|
|
24
|
+
messageTypeEnum["TEXT"] = "text";
|
|
25
|
+
messageTypeEnum["IMAGE"] = "image";
|
|
26
|
+
messageTypeEnum["AUDIO"] = "audio";
|
|
27
|
+
messageTypeEnum["VIDEO"] = "video";
|
|
28
|
+
})(messageTypeEnum || (exports.messageTypeEnum = messageTypeEnum = {}));
|
|
22
29
|
let FinancialChats = class FinancialChats extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(financial_request_id, content, sender_user_id) {
|
|
30
|
+
constructor(financial_request_id, content, sender_user_id, sender_role_id) {
|
|
24
31
|
super();
|
|
25
32
|
this.financial_request_id = financial_request_id;
|
|
26
33
|
this.content = content;
|
|
27
34
|
this.sender_user_id = sender_user_id;
|
|
35
|
+
this.sender_role_id = sender_role_id;
|
|
28
36
|
}
|
|
29
37
|
};
|
|
30
38
|
exports.FinancialChats = FinancialChats;
|
|
@@ -48,6 +56,22 @@ __decorate([
|
|
|
48
56
|
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
49
57
|
__metadata("design:type", Object)
|
|
50
58
|
], FinancialChats.prototype, "status", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], FinancialChats.prototype, "service_id", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], FinancialChats.prototype, "sub_service_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], FinancialChats.prototype, "message_type", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], FinancialChats.prototype, "sender_role_id", void 0);
|
|
51
75
|
__decorate([
|
|
52
76
|
(0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.chats),
|
|
53
77
|
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
|
@@ -55,5 +79,5 @@ __decorate([
|
|
|
55
79
|
], FinancialChats.prototype, "financialRequest", void 0);
|
|
56
80
|
exports.FinancialChats = FinancialChats = __decorate([
|
|
57
81
|
(0, typeorm_1.Entity)({ name: 'financial_chats' }),
|
|
58
|
-
__metadata("design:paramtypes", [Number, String, Number])
|
|
82
|
+
__metadata("design:paramtypes", [Number, String, Number, Number])
|
|
59
83
|
], FinancialChats);
|
|
@@ -14,6 +14,7 @@ export declare class FinancialWorkFlow extends BaseModel {
|
|
|
14
14
|
approved_by_user_id: number;
|
|
15
15
|
content: string;
|
|
16
16
|
activity_date: Date;
|
|
17
|
+
approved_by_role_id: number;
|
|
17
18
|
financialRequest?: FinancialRequests;
|
|
18
19
|
constructor(financial_request_id: number, status: FinancialWorkFlowStatus, approved_by_user_id: number, content: string);
|
|
19
20
|
}
|
|
@@ -57,6 +57,10 @@ __decorate([
|
|
|
57
57
|
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
58
58
|
__metadata("design:type", Date)
|
|
59
59
|
], FinancialWorkFlow.prototype, "activity_date", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], FinancialWorkFlow.prototype, "approved_by_role_id", void 0);
|
|
60
64
|
__decorate([
|
|
61
65
|
(0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.workflows),
|
|
62
66
|
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
package/package.json
CHANGED
|
@@ -8,6 +8,13 @@ export enum statusEnum {
|
|
|
8
8
|
REJECTED = "Rejected"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export enum messageTypeEnum {
|
|
12
|
+
TEXT = "text",
|
|
13
|
+
IMAGE = "image",
|
|
14
|
+
AUDIO = "audio",
|
|
15
|
+
VIDEO = "video"
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
@Entity({ name: 'financial_chats' })
|
|
12
19
|
export class FinancialChats extends BaseModel {
|
|
13
20
|
@Column({ type: 'int' })
|
|
@@ -25,15 +32,28 @@ export class FinancialChats extends BaseModel {
|
|
|
25
32
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
26
33
|
status: statusEnum | null;
|
|
27
34
|
|
|
35
|
+
@Column({ type: 'int', nullable: true })
|
|
36
|
+
service_id: number | null;
|
|
37
|
+
|
|
38
|
+
@Column({ type: 'int', nullable: true })
|
|
39
|
+
sub_service_id: number | null;
|
|
40
|
+
|
|
41
|
+
@Column({ type: 'int', nullable: true })
|
|
42
|
+
message_type: messageTypeEnum | null;
|
|
43
|
+
|
|
44
|
+
@Column({ type: 'int', nullable: true })
|
|
45
|
+
sender_role_id: number | null;
|
|
46
|
+
|
|
28
47
|
@ManyToOne(() => FinancialRequests, fr => fr.chats)
|
|
29
48
|
@JoinColumn({ name: 'financial_request_id' })
|
|
30
49
|
financialRequest?: FinancialRequests;
|
|
31
50
|
|
|
32
|
-
constructor(financial_request_id: number, content: string, sender_user_id: number) {
|
|
51
|
+
constructor(financial_request_id: number, content: string, sender_user_id: number, sender_role_id: number) {
|
|
33
52
|
super();
|
|
34
53
|
this.financial_request_id = financial_request_id;
|
|
35
54
|
this.content = content;
|
|
36
55
|
this.sender_user_id = sender_user_id;
|
|
56
|
+
this.sender_role_id = sender_role_id;
|
|
37
57
|
}
|
|
38
58
|
}
|
|
39
59
|
|
|
@@ -30,6 +30,10 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
30
30
|
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
|
31
31
|
activity_date: Date;
|
|
32
32
|
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'int', nullable: true })
|
|
35
|
+
approved_by_role_id: number;
|
|
36
|
+
|
|
33
37
|
@ManyToOne(() => FinancialRequests, fr => fr.workflows)
|
|
34
38
|
@JoinColumn({ name: 'financial_request_id' })
|
|
35
39
|
financialRequest?: FinancialRequests;
|