@platform-modules/civil-aviation-authority 2.0.5 → 2.0.6
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/LogisticsApprovalModel.d.ts +3 -1
- package/dist/models/LogisticsApprovalModel.js +13 -3
- package/dist/models/LogisticsAttachmentModel.d.ts +3 -1
- package/dist/models/LogisticsAttachmentModel.js +12 -2
- package/dist/models/LogisticsChatModel.d.ts +11 -1
- package/dist/models/LogisticsChatModel.js +31 -3
- package/dist/models/LogisticsWorkflowModel.d.ts +3 -1
- package/dist/models/LogisticsWorkflowModel.js +15 -5
- package/package.json +1 -1
- package/src/models/LogisticsApprovalModel.ts +12 -2
- package/src/models/LogisticsAttachmentModel.ts +10 -0
- package/src/models/LogisticsChatModel.ts +29 -3
- package/src/models/LogisticsWorkflowModel.ts +18 -4
|
@@ -6,6 +6,8 @@ export declare enum LogisticsApprovalStatus {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class LogisticsApprovalDetails extends BaseModel {
|
|
8
8
|
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
9
11
|
level: number;
|
|
10
12
|
approver_role_id: number;
|
|
11
13
|
department_id: number | null;
|
|
@@ -13,5 +15,5 @@ export declare class LogisticsApprovalDetails extends BaseModel {
|
|
|
13
15
|
approved_by: number | null;
|
|
14
16
|
comment: string;
|
|
15
17
|
approval_status: LogisticsApprovalStatus;
|
|
16
|
-
constructor(request_id: number, approver_role_id: number, comment: string, approval_status: LogisticsApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null);
|
|
18
|
+
constructor(request_id: number, approver_role_id: number, comment: string, approval_status: LogisticsApprovalStatus, level: number, department_id?: number | null, section_id?: number | null, approved_by?: number | null, service_id?: number, sub_service_id?: number);
|
|
17
19
|
}
|
|
@@ -19,9 +19,11 @@ var LogisticsApprovalStatus;
|
|
|
19
19
|
LogisticsApprovalStatus["REJECTED"] = "Rejected";
|
|
20
20
|
})(LogisticsApprovalStatus || (exports.LogisticsApprovalStatus = LogisticsApprovalStatus = {}));
|
|
21
21
|
let LogisticsApprovalDetails = class LogisticsApprovalDetails extends BaseModel_1.BaseModel {
|
|
22
|
-
constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by) {
|
|
22
|
+
constructor(request_id, approver_role_id, comment, approval_status, level, department_id, section_id, approved_by, service_id, sub_service_id) {
|
|
23
23
|
super();
|
|
24
24
|
this.request_id = request_id;
|
|
25
|
+
this.service_id = service_id || null;
|
|
26
|
+
this.sub_service_id = sub_service_id || null;
|
|
25
27
|
this.approver_role_id = approver_role_id;
|
|
26
28
|
this.comment = comment;
|
|
27
29
|
this.approval_status = approval_status;
|
|
@@ -36,6 +38,14 @@ __decorate([
|
|
|
36
38
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
37
39
|
__metadata("design:type", Number)
|
|
38
40
|
], LogisticsApprovalDetails.prototype, "request_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LogisticsApprovalDetails.prototype, "service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], LogisticsApprovalDetails.prototype, "sub_service_id", void 0);
|
|
39
49
|
__decorate([
|
|
40
50
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
41
51
|
__metadata("design:type", Number)
|
|
@@ -57,7 +67,7 @@ __decorate([
|
|
|
57
67
|
__metadata("design:type", Object)
|
|
58
68
|
], LogisticsApprovalDetails.prototype, "approved_by", void 0);
|
|
59
69
|
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({ type: 'varchar', length:
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true, default: '' }),
|
|
61
71
|
__metadata("design:type", String)
|
|
62
72
|
], LogisticsApprovalDetails.prototype, "comment", void 0);
|
|
63
73
|
__decorate([
|
|
@@ -66,5 +76,5 @@ __decorate([
|
|
|
66
76
|
], LogisticsApprovalDetails.prototype, "approval_status", void 0);
|
|
67
77
|
exports.LogisticsApprovalDetails = LogisticsApprovalDetails = __decorate([
|
|
68
78
|
(0, typeorm_1.Entity)({ name: 'logistics_approvals' }),
|
|
69
|
-
__metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object])
|
|
79
|
+
__metadata("design:paramtypes", [Number, Number, String, String, Number, Object, Object, Object, Number, Number])
|
|
70
80
|
], LogisticsApprovalDetails);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
2
|
export declare class LogisticsRequestAttachment extends BaseModel {
|
|
3
3
|
request_id: number;
|
|
4
|
+
service_id: number | null;
|
|
5
|
+
sub_service_id: number | null;
|
|
4
6
|
file_url: string;
|
|
5
7
|
file_name: string;
|
|
6
8
|
file_type: string;
|
|
7
9
|
file_size: number | null;
|
|
8
|
-
constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number);
|
|
10
|
+
constructor(request_id: number, file_url: string, file_name?: string, file_type?: string, file_size?: number, service_id?: number, sub_service_id?: number);
|
|
9
11
|
}
|
|
@@ -13,9 +13,11 @@ exports.LogisticsRequestAttachment = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let LogisticsRequestAttachment = class LogisticsRequestAttachment extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(request_id, file_url, file_name, file_type, file_size) {
|
|
16
|
+
constructor(request_id, file_url, file_name, file_type, file_size, service_id, sub_service_id) {
|
|
17
17
|
super();
|
|
18
18
|
this.request_id = request_id;
|
|
19
|
+
this.service_id = service_id || null;
|
|
20
|
+
this.sub_service_id = sub_service_id || null;
|
|
19
21
|
this.file_url = file_url;
|
|
20
22
|
this.file_name = file_name || '';
|
|
21
23
|
this.file_type = file_type || '';
|
|
@@ -27,6 +29,14 @@ __decorate([
|
|
|
27
29
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
28
30
|
__metadata("design:type", Number)
|
|
29
31
|
], LogisticsRequestAttachment.prototype, "request_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], LogisticsRequestAttachment.prototype, "service_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], LogisticsRequestAttachment.prototype, "sub_service_id", void 0);
|
|
30
40
|
__decorate([
|
|
31
41
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
32
42
|
__metadata("design:type", String)
|
|
@@ -45,5 +55,5 @@ __decorate([
|
|
|
45
55
|
], LogisticsRequestAttachment.prototype, "file_size", void 0);
|
|
46
56
|
exports.LogisticsRequestAttachment = LogisticsRequestAttachment = __decorate([
|
|
47
57
|
(0, typeorm_1.Entity)({ name: 'logistics_request_attachments' }),
|
|
48
|
-
__metadata("design:paramtypes", [Number, String, String, String, Number])
|
|
58
|
+
__metadata("design:paramtypes", [Number, String, String, String, Number, Number, Number])
|
|
49
59
|
], LogisticsRequestAttachment);
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum MessageType {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
IMAGE = "image",
|
|
5
|
+
VIDEO = "video",
|
|
6
|
+
FILE = "file",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
2
9
|
export declare class LogisticsRequestChat extends BaseModel {
|
|
3
10
|
request_id: number;
|
|
11
|
+
service_id: number | null;
|
|
12
|
+
sub_service_id: number | null;
|
|
4
13
|
user_id: number;
|
|
5
14
|
message: string;
|
|
6
|
-
|
|
15
|
+
messageType: MessageType;
|
|
16
|
+
constructor(request_id: number, user_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: MessageType);
|
|
7
17
|
}
|
|
@@ -9,15 +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.LogisticsRequestChat = void 0;
|
|
12
|
+
exports.LogisticsRequestChat = exports.MessageType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var MessageType;
|
|
16
|
+
(function (MessageType) {
|
|
17
|
+
MessageType["TEXT"] = "text";
|
|
18
|
+
MessageType["IMAGE"] = "image";
|
|
19
|
+
MessageType["VIDEO"] = "video";
|
|
20
|
+
MessageType["FILE"] = "file";
|
|
21
|
+
MessageType["LINK"] = "link";
|
|
22
|
+
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
15
23
|
let LogisticsRequestChat = class LogisticsRequestChat extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(request_id, user_id, message) {
|
|
24
|
+
constructor(request_id, user_id, message, service_id, sub_service_id, messageType) {
|
|
17
25
|
super();
|
|
18
26
|
this.request_id = request_id;
|
|
27
|
+
this.service_id = service_id || null;
|
|
28
|
+
this.sub_service_id = sub_service_id || null;
|
|
19
29
|
this.user_id = user_id;
|
|
20
30
|
this.message = message;
|
|
31
|
+
this.messageType = messageType || MessageType.TEXT;
|
|
21
32
|
}
|
|
22
33
|
};
|
|
23
34
|
exports.LogisticsRequestChat = LogisticsRequestChat;
|
|
@@ -25,6 +36,14 @@ __decorate([
|
|
|
25
36
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
26
37
|
__metadata("design:type", Number)
|
|
27
38
|
], LogisticsRequestChat.prototype, "request_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], LogisticsRequestChat.prototype, "service_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], LogisticsRequestChat.prototype, "sub_service_id", void 0);
|
|
28
47
|
__decorate([
|
|
29
48
|
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
30
49
|
__metadata("design:type", Number)
|
|
@@ -33,7 +52,16 @@ __decorate([
|
|
|
33
52
|
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
34
53
|
__metadata("design:type", String)
|
|
35
54
|
], LogisticsRequestChat.prototype, "message", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
type: 'enum',
|
|
58
|
+
enum: MessageType,
|
|
59
|
+
default: MessageType.TEXT,
|
|
60
|
+
nullable: false
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], LogisticsRequestChat.prototype, "messageType", void 0);
|
|
36
64
|
exports.LogisticsRequestChat = LogisticsRequestChat = __decorate([
|
|
37
65
|
(0, typeorm_1.Entity)({ name: 'logistics_request_chat' }),
|
|
38
|
-
__metadata("design:paramtypes", [Number, Number, String])
|
|
66
|
+
__metadata("design:paramtypes", [Number, Number, String, Number, Number, String])
|
|
39
67
|
], LogisticsRequestChat);
|
|
@@ -6,7 +6,9 @@ export declare enum LogisticsWorkFlowStatus {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class LogisticsWorkFlow extends BaseModel {
|
|
8
8
|
request_id: number;
|
|
9
|
+
service_id: number | null;
|
|
10
|
+
sub_service_id: number | null;
|
|
9
11
|
content: string;
|
|
10
12
|
status: LogisticsWorkFlowStatus;
|
|
11
|
-
constructor(request_id: number, content: string, status: LogisticsWorkFlowStatus);
|
|
13
|
+
constructor(request_id: number, content: string, status: LogisticsWorkFlowStatus, service_id?: number, sub_service_id?: number);
|
|
12
14
|
}
|
|
@@ -18,22 +18,32 @@ var LogisticsWorkFlowStatus;
|
|
|
18
18
|
LogisticsWorkFlowStatus["NOT_YET_STARTED"] = "Not Yet Started";
|
|
19
19
|
LogisticsWorkFlowStatus["PENDING"] = "Pending";
|
|
20
20
|
})(LogisticsWorkFlowStatus || (exports.LogisticsWorkFlowStatus = LogisticsWorkFlowStatus = {}));
|
|
21
|
-
//This model is used to store the
|
|
21
|
+
//This model is used to store the logistics workflow status and activity logs
|
|
22
22
|
let LogisticsWorkFlow = class LogisticsWorkFlow extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(request_id, content, status) {
|
|
23
|
+
constructor(request_id, content, status, service_id, sub_service_id) {
|
|
24
24
|
super();
|
|
25
25
|
this.request_id = request_id;
|
|
26
|
+
this.service_id = service_id || null;
|
|
27
|
+
this.sub_service_id = sub_service_id || null;
|
|
26
28
|
this.content = content;
|
|
27
29
|
this.status = status;
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
exports.LogisticsWorkFlow = LogisticsWorkFlow;
|
|
31
33
|
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)({ type: '
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
33
35
|
__metadata("design:type", Number)
|
|
34
36
|
], LogisticsWorkFlow.prototype, "request_id", void 0);
|
|
35
37
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ type: '
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], LogisticsWorkFlow.prototype, "service_id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LogisticsWorkFlow.prototype, "sub_service_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
37
47
|
__metadata("design:type", String)
|
|
38
48
|
], LogisticsWorkFlow.prototype, "content", void 0);
|
|
39
49
|
__decorate([
|
|
@@ -42,5 +52,5 @@ __decorate([
|
|
|
42
52
|
], LogisticsWorkFlow.prototype, "status", void 0);
|
|
43
53
|
exports.LogisticsWorkFlow = LogisticsWorkFlow = __decorate([
|
|
44
54
|
(0, typeorm_1.Entity)({ name: 'logistics_workflows' }),
|
|
45
|
-
__metadata("design:paramtypes", [Number, String, String])
|
|
55
|
+
__metadata("design:paramtypes", [Number, String, String, Number, Number])
|
|
46
56
|
], LogisticsWorkFlow);
|
package/package.json
CHANGED
|
@@ -13,6 +13,12 @@ export class LogisticsApprovalDetails extends BaseModel {
|
|
|
13
13
|
@Column({ type: 'integer', nullable: false })
|
|
14
14
|
request_id: number;
|
|
15
15
|
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
16
22
|
@Column({ type: 'integer', nullable: false })
|
|
17
23
|
level: number;
|
|
18
24
|
|
|
@@ -28,7 +34,7 @@ export class LogisticsApprovalDetails extends BaseModel {
|
|
|
28
34
|
@Column({ type: 'integer', nullable: true })
|
|
29
35
|
approved_by: number | null;
|
|
30
36
|
|
|
31
|
-
@Column({ type: 'varchar', length:
|
|
37
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
32
38
|
comment: string;
|
|
33
39
|
|
|
34
40
|
@Column({ type: 'enum', enum: LogisticsApprovalStatus,default: LogisticsApprovalStatus.PENDING, nullable: false })
|
|
@@ -42,10 +48,14 @@ export class LogisticsApprovalDetails extends BaseModel {
|
|
|
42
48
|
level: number,
|
|
43
49
|
department_id?: number | null,
|
|
44
50
|
section_id?: number | null,
|
|
45
|
-
approved_by?: number | null
|
|
51
|
+
approved_by?: number | null,
|
|
52
|
+
service_id?: number,
|
|
53
|
+
sub_service_id?: number
|
|
46
54
|
) {
|
|
47
55
|
super();
|
|
48
56
|
this.request_id = request_id;
|
|
57
|
+
this.service_id = service_id || null;
|
|
58
|
+
this.sub_service_id = sub_service_id || null;
|
|
49
59
|
this.approver_role_id = approver_role_id;
|
|
50
60
|
this.comment = comment;
|
|
51
61
|
this.approval_status = approval_status;
|
|
@@ -9,6 +9,12 @@ export class LogisticsRequestAttachment extends BaseModel {
|
|
|
9
9
|
@Column({ type: 'integer', nullable: false })
|
|
10
10
|
request_id: number;
|
|
11
11
|
|
|
12
|
+
@Column({ type: 'integer', nullable: true })
|
|
13
|
+
service_id: number | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
sub_service_id: number | null;
|
|
17
|
+
|
|
12
18
|
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
13
19
|
file_url: string;
|
|
14
20
|
|
|
@@ -28,9 +34,13 @@ export class LogisticsRequestAttachment extends BaseModel {
|
|
|
28
34
|
file_name?: string,
|
|
29
35
|
file_type?: string,
|
|
30
36
|
file_size?: number,
|
|
37
|
+
service_id?: number,
|
|
38
|
+
sub_service_id?: number
|
|
31
39
|
) {
|
|
32
40
|
super();
|
|
33
41
|
this.request_id = request_id;
|
|
42
|
+
this.service_id = service_id || null;
|
|
43
|
+
this.sub_service_id = sub_service_id || null;
|
|
34
44
|
this.file_url = file_url;
|
|
35
45
|
this.file_name = file_name || '';
|
|
36
46
|
this.file_type = file_type || '';
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { Column, Entity
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
export enum MessageType {
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
IMAGE = "image",
|
|
7
|
+
VIDEO = "video",
|
|
8
|
+
FILE = "file",
|
|
9
|
+
LINK = "link"
|
|
10
|
+
}
|
|
5
11
|
|
|
6
12
|
@Entity({ name: 'logistics_request_chat' })
|
|
7
13
|
export class LogisticsRequestChat extends BaseModel {
|
|
@@ -9,21 +15,41 @@ export class LogisticsRequestChat extends BaseModel {
|
|
|
9
15
|
@Column({ type: 'integer', nullable: false })
|
|
10
16
|
request_id: number;
|
|
11
17
|
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: true })
|
|
22
|
+
sub_service_id: number | null;
|
|
23
|
+
|
|
12
24
|
@Column({ type: 'integer', nullable: false })
|
|
13
25
|
user_id: number;
|
|
14
26
|
|
|
15
27
|
@Column({ type: 'text', nullable: false })
|
|
16
28
|
message: string;
|
|
17
29
|
|
|
30
|
+
@Column({
|
|
31
|
+
type: 'enum',
|
|
32
|
+
enum: MessageType,
|
|
33
|
+
default: MessageType.TEXT,
|
|
34
|
+
nullable: false
|
|
35
|
+
})
|
|
36
|
+
messageType: MessageType;
|
|
37
|
+
|
|
18
38
|
constructor(
|
|
19
39
|
request_id: number,
|
|
20
40
|
user_id: number,
|
|
21
41
|
message: string,
|
|
42
|
+
service_id?: number,
|
|
43
|
+
sub_service_id?: number,
|
|
44
|
+
messageType?: MessageType
|
|
22
45
|
) {
|
|
23
46
|
super();
|
|
24
47
|
this.request_id = request_id;
|
|
48
|
+
this.service_id = service_id || null;
|
|
49
|
+
this.sub_service_id = sub_service_id || null;
|
|
25
50
|
this.user_id = user_id;
|
|
26
51
|
this.message = message;
|
|
52
|
+
this.messageType = messageType || MessageType.TEXT;
|
|
27
53
|
}
|
|
28
54
|
}
|
|
29
55
|
|
|
@@ -7,21 +7,35 @@ export enum LogisticsWorkFlowStatus {
|
|
|
7
7
|
PENDING = "Pending"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
//This model is used to store the
|
|
10
|
+
//This model is used to store the logistics workflow status and activity logs
|
|
11
11
|
@Entity({ name: 'logistics_workflows' })
|
|
12
12
|
export class LogisticsWorkFlow extends BaseModel {
|
|
13
|
-
@Column({ type: '
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
14
|
request_id: number;
|
|
15
15
|
|
|
16
|
-
@Column({ type: '
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
23
|
content: string;
|
|
18
24
|
|
|
19
25
|
@Column({ type: 'enum', enum: LogisticsWorkFlowStatus, default: LogisticsWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
20
26
|
status: LogisticsWorkFlowStatus;
|
|
21
27
|
|
|
22
|
-
constructor(
|
|
28
|
+
constructor(
|
|
29
|
+
request_id: number,
|
|
30
|
+
content: string,
|
|
31
|
+
status: LogisticsWorkFlowStatus,
|
|
32
|
+
service_id?: number,
|
|
33
|
+
sub_service_id?: number
|
|
34
|
+
) {
|
|
23
35
|
super();
|
|
24
36
|
this.request_id = request_id;
|
|
37
|
+
this.service_id = service_id || null;
|
|
38
|
+
this.sub_service_id = sub_service_id || null;
|
|
25
39
|
this.content = content;
|
|
26
40
|
this.status = status;
|
|
27
41
|
}
|