gemcap-be-common 1.4.139 → 1.4.140
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.
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import mongoose, { Model } from 'mongoose';
|
|
26
|
+
type BorrowerNoteStatus = 'draft' | 'processing' | 'ready' | 'failed';
|
|
26
27
|
export interface IBorrowerNoteAttachment {
|
|
27
28
|
fileId: string;
|
|
28
29
|
fileName: string;
|
|
@@ -34,9 +35,10 @@ export interface IBorrowerNoteAttachment {
|
|
|
34
35
|
isInline: boolean;
|
|
35
36
|
}
|
|
36
37
|
export interface IBorrowerNote {
|
|
38
|
+
status: BorrowerNoteStatus;
|
|
37
39
|
borrowerId: mongoose.Types.ObjectId;
|
|
38
|
-
subjectId
|
|
39
|
-
text
|
|
40
|
+
subjectId?: mongoose.Types.ObjectId;
|
|
41
|
+
text?: string;
|
|
40
42
|
attachments: IBorrowerNoteAttachment[];
|
|
41
43
|
createdBy: string;
|
|
42
44
|
updatedBy?: string;
|
|
@@ -81,3 +83,4 @@ export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongo
|
|
|
81
83
|
export declare const BorrowerNote: mongoose.Model<IBorrowerNoteDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
|
|
82
84
|
_id: mongoose.Types.ObjectId;
|
|
83
85
|
}>, any>;
|
|
86
|
+
export {};
|
|
@@ -49,15 +49,21 @@ exports.BorrowerNoteSchema = new mongoose_1.default.Schema({
|
|
|
49
49
|
required: true,
|
|
50
50
|
index: true,
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
type:
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
status: {
|
|
53
|
+
type: String,
|
|
54
|
+
enum: ['draft', 'processing', 'ready', 'failed'],
|
|
55
|
+
default: 'draft',
|
|
56
56
|
index: true,
|
|
57
57
|
},
|
|
58
58
|
text: {
|
|
59
59
|
type: String,
|
|
60
|
-
required:
|
|
60
|
+
required: false,
|
|
61
|
+
},
|
|
62
|
+
subjectId: {
|
|
63
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
64
|
+
ref: _models_1.MODEL_NAMES.borrowerNoteSubject,
|
|
65
|
+
required: false,
|
|
66
|
+
index: true,
|
|
61
67
|
},
|
|
62
68
|
createdBy: {
|
|
63
69
|
type: String,
|
|
@@ -2,6 +2,12 @@ import mongoose, { Model } from 'mongoose';
|
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
4
|
|
|
5
|
+
type BorrowerNoteStatus =
|
|
6
|
+
| 'draft'
|
|
7
|
+
| 'processing'
|
|
8
|
+
| 'ready'
|
|
9
|
+
| 'failed';
|
|
10
|
+
|
|
5
11
|
export interface IBorrowerNoteAttachment {
|
|
6
12
|
fileId: string;
|
|
7
13
|
fileName: string;
|
|
@@ -14,9 +20,10 @@ export interface IBorrowerNoteAttachment {
|
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
export interface IBorrowerNote {
|
|
23
|
+
status: BorrowerNoteStatus;
|
|
17
24
|
borrowerId: mongoose.Types.ObjectId;
|
|
18
|
-
subjectId
|
|
19
|
-
text
|
|
25
|
+
subjectId?: mongoose.Types.ObjectId;
|
|
26
|
+
text?: string;
|
|
20
27
|
attachments: IBorrowerNoteAttachment[];
|
|
21
28
|
createdBy: string;
|
|
22
29
|
updatedBy?: string;
|
|
@@ -104,15 +111,21 @@ export const BorrowerNoteSchema = new mongoose.Schema<IBorrowerNoteDoc>({
|
|
|
104
111
|
required: true,
|
|
105
112
|
index: true,
|
|
106
113
|
},
|
|
107
|
-
|
|
108
|
-
type:
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
status: {
|
|
115
|
+
type: String,
|
|
116
|
+
enum: ['draft', 'processing', 'ready', 'failed'],
|
|
117
|
+
default: 'draft',
|
|
111
118
|
index: true,
|
|
112
119
|
},
|
|
113
120
|
text: {
|
|
114
121
|
type: String,
|
|
115
|
-
required:
|
|
122
|
+
required: false,
|
|
123
|
+
},
|
|
124
|
+
subjectId: {
|
|
125
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
126
|
+
ref: MODEL_NAMES.borrowerNoteSubject,
|
|
127
|
+
required: false,
|
|
128
|
+
index: true,
|
|
116
129
|
},
|
|
117
130
|
createdBy: {
|
|
118
131
|
type: String,
|