payservedb 3.5.0 → 3.5.2
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/package.json
CHANGED
|
@@ -57,13 +57,9 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
57
57
|
isPrimary: { type: Boolean, default: false }
|
|
58
58
|
}],
|
|
59
59
|
securityDeposit: { type: Number, required: true },
|
|
60
|
-
|
|
61
|
-
type:
|
|
62
|
-
|
|
63
|
-
percentage: { type: Number },
|
|
64
|
-
appliesAfter: { type: Number, default: 7 } // Days after due date
|
|
65
|
-
},
|
|
66
|
-
default: null
|
|
60
|
+
penaltyId: { // Reference to Penalty collection
|
|
61
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
62
|
+
ref: 'Penalty'
|
|
67
63
|
}
|
|
68
64
|
},
|
|
69
65
|
billingCycle: {
|
|
@@ -96,8 +92,10 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
96
92
|
],
|
|
97
93
|
reminders: [
|
|
98
94
|
{
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
reminderId: { // Reference to Reminder collection
|
|
96
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
97
|
+
ref: 'Reminder'
|
|
98
|
+
},
|
|
101
99
|
status: { type: String, enum: ['Pending', 'Sent'], default: 'Pending' }
|
|
102
100
|
}
|
|
103
101
|
],
|
package/src/models/reminder.js
CHANGED
|
@@ -12,13 +12,13 @@ const reminderSchema = new mongoose.Schema(
|
|
|
12
12
|
type: {
|
|
13
13
|
type: String,
|
|
14
14
|
required: true,
|
|
15
|
-
enum: ['standard', 'custom'],
|
|
15
|
+
enum: ['standard', 'custom'],
|
|
16
16
|
default: 'standard'
|
|
17
17
|
},
|
|
18
18
|
module: {
|
|
19
19
|
type: String,
|
|
20
20
|
required: true,
|
|
21
|
-
enum: ['levy', 'lease'],
|
|
21
|
+
enum: ['levy', 'lease'],
|
|
22
22
|
default: 'levy'
|
|
23
23
|
},
|
|
24
24
|
remindOn: {
|
|
@@ -171,4 +171,4 @@ reminderSchema.methods.isTimeToProcess = function (currentTime) {
|
|
|
171
171
|
|
|
172
172
|
const Reminder = mongoose.model("Reminder", reminderSchema);
|
|
173
173
|
|
|
174
|
-
module.exports
|
|
174
|
+
module.exports = Reminder;
|