payservedb 8.6.0 → 8.6.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/customer.js +4 -0
- package/src/models/levycontract.js +33 -0
- package/src/models/user.js +0 -4
package/package.json
CHANGED
package/src/models/customer.js
CHANGED
|
@@ -103,6 +103,39 @@ const LevyContractSchema = new Schema(
|
|
|
103
103
|
type: String,
|
|
104
104
|
default: null
|
|
105
105
|
// Format: "2025-09", "2025-10", etc.
|
|
106
|
+
},
|
|
107
|
+
// Upfront payment fields
|
|
108
|
+
upfrontPayment: {
|
|
109
|
+
enabled: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
},
|
|
113
|
+
amount: {
|
|
114
|
+
type: Number,
|
|
115
|
+
default: 0,
|
|
116
|
+
min: [0, 'Upfront amount cannot be negative']
|
|
117
|
+
},
|
|
118
|
+
billingPeriods: {
|
|
119
|
+
type: [String],
|
|
120
|
+
default: []
|
|
121
|
+
},
|
|
122
|
+
collectionFrequency: {
|
|
123
|
+
type: String,
|
|
124
|
+
enum: ['Monthly', 'Quarterly', 'Semi-Annually', 'Annually'],
|
|
125
|
+
default: 'Monthly'
|
|
126
|
+
},
|
|
127
|
+
remainingAmount: {
|
|
128
|
+
type: Number,
|
|
129
|
+
default: 0
|
|
130
|
+
},
|
|
131
|
+
processedPeriods: {
|
|
132
|
+
type: [String],
|
|
133
|
+
default: []
|
|
134
|
+
},
|
|
135
|
+
createdAt: {
|
|
136
|
+
type: Date,
|
|
137
|
+
default: Date.now
|
|
138
|
+
}
|
|
106
139
|
}
|
|
107
140
|
},
|
|
108
141
|
{
|
package/src/models/user.js
CHANGED