gemcap-be-common 1.4.75 → 1.4.77
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/models/Borrower.model.d.ts +6 -6
- package/models/BorrowerNote.model.d.ts +64 -0
- package/models/BorrowerNote.model.js +47 -0
- package/models/BorrowerNote.model.ts +83 -0
- package/models/_models.d.ts +1 -0
- package/models/_models.js +1 -0
- package/models/_models.ts +1 -3
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -64,10 +64,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
64
64
|
createdAt: NativeDate;
|
|
65
65
|
updatedAt: NativeDate;
|
|
66
66
|
} & {
|
|
67
|
-
code: string;
|
|
68
67
|
name: string;
|
|
69
|
-
title: string;
|
|
70
68
|
active: boolean;
|
|
69
|
+
code: string;
|
|
70
|
+
title: string;
|
|
71
71
|
accrualStatus: boolean;
|
|
72
72
|
__v?: number;
|
|
73
73
|
organizationId?: mongoose.Types.ObjectId;
|
|
@@ -83,10 +83,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
83
83
|
createdAt: NativeDate;
|
|
84
84
|
updatedAt: NativeDate;
|
|
85
85
|
} & {
|
|
86
|
-
code: string;
|
|
87
86
|
name: string;
|
|
88
|
-
title: string;
|
|
89
87
|
active: boolean;
|
|
88
|
+
code: string;
|
|
89
|
+
title: string;
|
|
90
90
|
accrualStatus: boolean;
|
|
91
91
|
__v?: number;
|
|
92
92
|
organizationId?: mongoose.Types.ObjectId;
|
|
@@ -102,10 +102,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
|
102
102
|
createdAt: NativeDate;
|
|
103
103
|
updatedAt: NativeDate;
|
|
104
104
|
} & {
|
|
105
|
-
code: string;
|
|
106
105
|
name: string;
|
|
107
|
-
title: string;
|
|
108
106
|
active: boolean;
|
|
107
|
+
code: string;
|
|
108
|
+
title: string;
|
|
109
109
|
accrualStatus: boolean;
|
|
110
110
|
__v?: number;
|
|
111
111
|
organizationId?: mongoose.Types.ObjectId;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import mongoose, { Model } from 'mongoose';
|
|
26
|
+
export interface IBorrowerNoteAttachment {
|
|
27
|
+
fileId: string;
|
|
28
|
+
fileName: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
size: number;
|
|
31
|
+
}
|
|
32
|
+
export interface IBorrowerNote {
|
|
33
|
+
borrowerId: mongoose.Types.ObjectId;
|
|
34
|
+
text: string;
|
|
35
|
+
attachments: IBorrowerNoteAttachment[];
|
|
36
|
+
createdBy: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IBorrowerNoteDoc extends IBorrowerNote, Document {
|
|
39
|
+
_id: mongoose.Types.ObjectId;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
43
|
+
export interface IBorrowerNoteCreate extends Omit<IBorrowerNote, '_id' | 'borrowerId'> {
|
|
44
|
+
borrowerId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface IBorrowerNoteLean extends IBorrowerNote {
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export interface IBorrowerNotePlain extends IBorrowerNote {
|
|
52
|
+
_id: string;
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
updatedAt: Date;
|
|
55
|
+
}
|
|
56
|
+
export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
|
|
57
|
+
export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongoose.Model<IBorrowerNoteDoc, any, any, any, mongoose.Document<unknown, any, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
|
|
58
|
+
_id: mongoose.Types.ObjectId;
|
|
59
|
+
}>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IBorrowerNoteDoc, mongoose.Document<unknown, {}, mongoose.FlatRecord<IBorrowerNoteDoc>> & mongoose.FlatRecord<IBorrowerNoteDoc> & Required<{
|
|
60
|
+
_id: mongoose.Types.ObjectId;
|
|
61
|
+
}>>;
|
|
62
|
+
export declare const BorrowerNote: mongoose.Model<IBorrowerNoteDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
|
|
63
|
+
_id: mongoose.Types.ObjectId;
|
|
64
|
+
}>, any>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BorrowerNote = exports.BorrowerNoteSchema = void 0;
|
|
7
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
+
const _models_1 = require("./_models");
|
|
9
|
+
const BorrowerNoteAttachmentSchema = new mongoose_1.default.Schema({
|
|
10
|
+
fileId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
fileName: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
mimeType: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
exports.BorrowerNoteSchema = new mongoose_1.default.Schema({
|
|
28
|
+
borrowerId: {
|
|
29
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
30
|
+
ref: _models_1.MODEL_NAMES.borrowers,
|
|
31
|
+
required: true,
|
|
32
|
+
index: true,
|
|
33
|
+
},
|
|
34
|
+
text: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
createdBy: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
attachments: [BorrowerNoteAttachmentSchema],
|
|
43
|
+
}, {
|
|
44
|
+
timestamps: true,
|
|
45
|
+
versionKey: false,
|
|
46
|
+
});
|
|
47
|
+
exports.BorrowerNote = mongoose_1.default.model(_models_1.MODEL_NAMES.borrowerNote, exports.BorrowerNoteSchema);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import mongoose, { Model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
import { MODEL_NAMES } from './_models';
|
|
4
|
+
|
|
5
|
+
export interface IBorrowerNoteAttachment {
|
|
6
|
+
fileId: string,
|
|
7
|
+
fileName: string,
|
|
8
|
+
mimeType: string,
|
|
9
|
+
size: number,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface IBorrowerNote {
|
|
13
|
+
borrowerId: mongoose.Types.ObjectId,
|
|
14
|
+
text: string,
|
|
15
|
+
attachments: IBorrowerNoteAttachment[],
|
|
16
|
+
createdBy: string,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IBorrowerNoteDoc extends IBorrowerNote, Document {
|
|
20
|
+
_id: mongoose.Types.ObjectId;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IBorrowerNoteCreate extends Omit<IBorrowerNote, '_id' | 'borrowerId'> {
|
|
26
|
+
borrowerId: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IBorrowerNoteLean extends IBorrowerNote {
|
|
30
|
+
_id: mongoose.Types.ObjectId;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IBorrowerNotePlain extends IBorrowerNote {
|
|
36
|
+
_id: string;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
|
|
42
|
+
|
|
43
|
+
const BorrowerNoteAttachmentSchema = new mongoose.Schema<IBorrowerNoteAttachment>({
|
|
44
|
+
fileId: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true,
|
|
47
|
+
},
|
|
48
|
+
fileName: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
mimeType: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false,
|
|
55
|
+
},
|
|
56
|
+
size: {
|
|
57
|
+
type: Number,
|
|
58
|
+
required: false,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const BorrowerNoteSchema = new mongoose.Schema<IBorrowerNoteDoc>({
|
|
63
|
+
borrowerId: {
|
|
64
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
65
|
+
ref: MODEL_NAMES.borrowers,
|
|
66
|
+
required: true,
|
|
67
|
+
index: true,
|
|
68
|
+
},
|
|
69
|
+
text: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
createdBy: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: true,
|
|
76
|
+
},
|
|
77
|
+
attachments: [BorrowerNoteAttachmentSchema],
|
|
78
|
+
}, {
|
|
79
|
+
timestamps: true,
|
|
80
|
+
versionKey: false,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const BorrowerNote = mongoose.model<IBorrowerNoteDoc>(MODEL_NAMES.borrowerNote, BorrowerNoteSchema);
|
package/models/_models.d.ts
CHANGED
package/models/_models.js
CHANGED
|
@@ -36,6 +36,7 @@ exports.MODEL_NAMES = {
|
|
|
36
36
|
borrowerDataTerms: 'borrower_data_terms',
|
|
37
37
|
borrowerSettings: 'borrowerSettings',
|
|
38
38
|
borrowerSummaries: 'borrower_summaries',
|
|
39
|
+
borrowerNote: 'borrower_notes',
|
|
39
40
|
calendarDays: 'calendar_days',
|
|
40
41
|
cashAllocations: 'cash_allocations',
|
|
41
42
|
cashAllocationProducts: 'cash_allocation_products',
|
package/models/_models.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { AppraiserModel } from './Appraiser.model';
|
|
2
|
-
import { IAppraiserContact } from './AppraiserContact.model';
|
|
3
|
-
|
|
4
1
|
export const MODEL_NAMES = {
|
|
5
2
|
accountPayableItem: 'AccountPayableItem',
|
|
6
3
|
allocatedBankTransactions: 'allocated_bank_transactions',
|
|
@@ -36,6 +33,7 @@ export const MODEL_NAMES = {
|
|
|
36
33
|
borrowerDataTerms: 'borrower_data_terms',
|
|
37
34
|
borrowerSettings: 'borrowerSettings',
|
|
38
35
|
borrowerSummaries: 'borrower_summaries',
|
|
36
|
+
borrowerNote: 'borrower_notes',
|
|
39
37
|
calendarDays: 'calendar_days',
|
|
40
38
|
cashAllocations: 'cash_allocations',
|
|
41
39
|
cashAllocationProducts: 'cash_allocation_products',
|