gemcap-be-common 1.4.68 → 1.4.70
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.
|
@@ -29,6 +29,10 @@ export interface IAssignedProspect {
|
|
|
29
29
|
assignedAt?: Date;
|
|
30
30
|
assignedBy?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface IAssignedProspectCreate extends Omit<IAssignedProspect, 'borrowerId' | 'prospectId'> {
|
|
33
|
+
borrowerId: string;
|
|
34
|
+
prospectId: string;
|
|
35
|
+
}
|
|
32
36
|
export interface IAssignedProspectDoc extends IAssignedProspect, Document {
|
|
33
37
|
_id: mongoose.Types.ObjectId;
|
|
34
38
|
createdAt: Date;
|
|
@@ -11,13 +11,11 @@ exports.AssignedProspectSchema = new mongoose_1.default.Schema({
|
|
|
11
11
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
12
12
|
ref: _models_1.MODEL_NAMES.CRMProspects,
|
|
13
13
|
required: true,
|
|
14
|
-
index: true,
|
|
15
14
|
},
|
|
16
15
|
borrowerId: {
|
|
17
16
|
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
18
17
|
ref: _models_1.MODEL_NAMES.borrowers,
|
|
19
18
|
required: true,
|
|
20
|
-
index: true,
|
|
21
19
|
},
|
|
22
20
|
assignedAt: {
|
|
23
21
|
type: Date,
|
|
@@ -29,4 +27,5 @@ exports.AssignedProspectSchema = new mongoose_1.default.Schema({
|
|
|
29
27
|
timestamps: true,
|
|
30
28
|
versionKey: false,
|
|
31
29
|
});
|
|
30
|
+
exports.AssignedProspectSchema.index({ borrowerId: 1 }, { unique: true });
|
|
32
31
|
exports.AssignedProspect = mongoose_1.default.model(_models_1.MODEL_NAMES.assignedProspects, exports.AssignedProspectSchema);
|
|
@@ -9,6 +9,11 @@ export interface IAssignedProspect {
|
|
|
9
9
|
assignedBy?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface IAssignedProspectCreate extends Omit<IAssignedProspect, 'borrowerId' | 'prospectId'> {
|
|
13
|
+
borrowerId: string;
|
|
14
|
+
prospectId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
export interface IAssignedProspectDoc extends IAssignedProspect, Document {
|
|
13
18
|
_id: mongoose.Types.ObjectId;
|
|
14
19
|
createdAt: Date;
|
|
@@ -51,4 +56,6 @@ export const AssignedProspectSchema = new mongoose.Schema<IAssignedProspectDoc>(
|
|
|
51
56
|
versionKey: false,
|
|
52
57
|
});
|
|
53
58
|
|
|
59
|
+
AssignedProspectSchema.index({ borrowerId: 1 }, { unique: true });
|
|
60
|
+
|
|
54
61
|
export const AssignedProspect = mongoose.model<IAssignedProspectDoc>(MODEL_NAMES.assignedProspects, AssignedProspectSchema);
|