payservedb 3.4.0 → 3.4.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 +1 -1
- package/src/models/dutyroster.js +14 -7
- package/src/models/leaseagreement.js +21 -2
package/package.json
CHANGED
package/src/models/dutyroster.js
CHANGED
|
@@ -18,16 +18,23 @@ const dutyRosterSchema = new mongoose.Schema({
|
|
|
18
18
|
type: String,
|
|
19
19
|
required: true,
|
|
20
20
|
},
|
|
21
|
-
day: {
|
|
22
|
-
type: String, // e.g., 'Monday', 'Tuesday'
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
21
|
time: {
|
|
26
22
|
type: String, // e.g., '08:00 AM - 05:00 PM'
|
|
27
|
-
required: true
|
|
23
|
+
required: true
|
|
28
24
|
},
|
|
25
|
+
schedule: [{
|
|
26
|
+
date: {
|
|
27
|
+
type: Date,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
status: {
|
|
31
|
+
type: String,
|
|
32
|
+
enum: ['pending', 'completed', 'missed', 'rescheduled'],
|
|
33
|
+
default: 'pending'
|
|
34
|
+
}
|
|
35
|
+
}]
|
|
29
36
|
}, {
|
|
30
|
-
timestamps: true
|
|
37
|
+
timestamps: true
|
|
31
38
|
});
|
|
32
39
|
|
|
33
|
-
module.exports = mongoose.model('DutyRoster', dutyRosterSchema);
|
|
40
|
+
module.exports = mongoose.model('DutyRoster', dutyRosterSchema);
|
|
@@ -31,7 +31,26 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
31
31
|
financialTerms: {
|
|
32
32
|
monthlyRent: { type: Number, required: true },
|
|
33
33
|
paymentDueDate: { type: Number, required: true },
|
|
34
|
-
paymentMethod: {
|
|
34
|
+
paymentMethod: {
|
|
35
|
+
type: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true,
|
|
38
|
+
enum: ['Bank Transfer', 'Mobile Money', 'Cash', 'Cheque']
|
|
39
|
+
},
|
|
40
|
+
details: {
|
|
41
|
+
// For Bank Transfer
|
|
42
|
+
bankName: String,
|
|
43
|
+
accountName: String,
|
|
44
|
+
accountNumber: String,
|
|
45
|
+
branch: String,
|
|
46
|
+
swiftCode: String,
|
|
47
|
+
// For Mobile Money
|
|
48
|
+
phoneNumber: String,
|
|
49
|
+
provider: String,
|
|
50
|
+
accountName: String,
|
|
51
|
+
// For Cash/Cheque, no additional details needed
|
|
52
|
+
}
|
|
53
|
+
},
|
|
35
54
|
securityDeposit: { type: Number, required: true }
|
|
36
55
|
},
|
|
37
56
|
billingCycle: {
|
|
@@ -85,4 +104,4 @@ const leaseAgreementSchema = new mongoose.Schema({
|
|
|
85
104
|
|
|
86
105
|
const LeaseAgreement = mongoose.model('LeaseAgreement', leaseAgreementSchema);
|
|
87
106
|
|
|
88
|
-
module.exports =
|
|
107
|
+
module.exports = LeaseAgreement;
|