payservedb 5.3.1 → 5.3.3
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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const waterPrepaidCreditSchema = new mongoose.Schema({
|
|
4
|
+
accountId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'WaterMeterAccount',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
meterId: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'WaterMeter',
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
ref: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
amount: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
default: 0
|
|
22
|
+
},
|
|
23
|
+
time: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
addedOn: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
enum: ['Mobile Money', 'Bank', 'Manual'],
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
}, {
|
|
38
|
+
timestamps: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const WaterPrepaidCredit = mongoose.model('WaterPrepaidCredit', waterPrepaidCreditSchema);
|
|
42
|
+
|
|
43
|
+
module.exports = WaterPrepaidCredit;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const waterPrepaidDebitSchema = new mongoose.Schema({
|
|
4
|
+
accountId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'WaterMeterAccount',
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
meterId: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'WaterMeter',
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
prev_reading: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
current_reading: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
default: 0
|
|
22
|
+
},
|
|
23
|
+
consumption: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
rate: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
totalAmount: {
|
|
32
|
+
type: Number,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
date: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
time: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
}, {
|
|
45
|
+
timestamps: true
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const WaterPrepaidDebit = mongoose.model('WaterPrepaidDebit', waterPrepaidDebitSchema);
|
|
49
|
+
|
|
50
|
+
module.exports = WaterPrepaidDebit;
|