payservedb 1.8.6 → 1.8.7
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/index.js +98 -97
- package/package.json +15 -15
- package/src/models/apilog.js +18 -18
- package/src/models/archivedapilog.js +18 -18
- package/src/models/archivedauditlog.js +83 -83
- package/src/models/auditlog.js +83 -83
- package/src/models/bankdetails.js +40 -40
- package/src/models/combinedUnits.js +62 -62
- package/src/models/company.js +52 -52
- package/src/models/contract.js +42 -42
- package/src/models/customer.js +126 -126
- package/src/models/email.js +24 -24
- package/src/models/entry_exit.js +39 -43
- package/src/models/facility.js +39 -39
- package/src/models/facilityasset.js +25 -25
- package/src/models/guard.js +43 -47
- package/src/models/invoice.js +105 -105
- package/src/models/invoiceBillingSetting.js +29 -29
- package/src/models/levy.js +49 -49
- package/src/models/levytype.js +19 -19
- package/src/models/message.js +38 -38
- package/src/models/module.js +21 -21
- package/src/models/penalty.js +51 -51
- package/src/models/refresh_token.js +23 -23
- package/src/models/reminder.js +47 -47
- package/src/models/settings.js +19 -19
- package/src/models/sms_africastalking.js +20 -20
- package/src/models/sms_meliora.js +16 -16
- package/src/models/tax.js +35 -35
- package/src/models/unitasset.js +25 -25
- package/src/models/units.js +66 -66
- package/src/models/user.js +81 -81
- package/src/models/visitLog.js +72 -83
- package/src/models/visitor.js +50 -50
- package/src/models/waterConcentrator.js +50 -50
- package/src/models/waterMeter.js +50 -0
- package/src/models/waterMeterSetting.js +29 -29
package/src/models/levy.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
const e = require('cors');
|
|
2
|
-
const mongoose = require('mongoose');
|
|
3
|
-
|
|
4
|
-
const LevySchema = new mongoose.Schema({
|
|
5
|
-
levyName: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: [true, 'Levy name is required'],
|
|
8
|
-
trim: true,
|
|
9
|
-
},
|
|
10
|
-
amount: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: [true, 'amount is required'],
|
|
13
|
-
},
|
|
14
|
-
levyType: {
|
|
15
|
-
type: mongoose.Schema.Types.ObjectId, // Update this to reference LevyType
|
|
16
|
-
ref: 'LevyType',
|
|
17
|
-
required: [true, 'Levy type is required'],
|
|
18
|
-
},
|
|
19
|
-
levyApplicant: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: [true, 'Levy applicant is required'],
|
|
22
|
-
trim: true,
|
|
23
|
-
},
|
|
24
|
-
collectionFrequency: {
|
|
25
|
-
type: String,
|
|
26
|
-
required: [true, 'Collection Frequency is required'],
|
|
27
|
-
trim: true,
|
|
28
|
-
enum: ['Monthly', 'Quarterly', 'Annually', 'Semi-annually', 'Weekly']
|
|
29
|
-
},
|
|
30
|
-
invoiceDate: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: [true, 'Invoice Date is required'],
|
|
33
|
-
trim: true,
|
|
34
|
-
},
|
|
35
|
-
disabled: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false
|
|
38
|
-
},
|
|
39
|
-
facilityId: {
|
|
40
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
41
|
-
ref: 'Facility',
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const Levy = mongoose.model('Levy', LevySchema);
|
|
48
|
-
|
|
49
|
-
module.exports = Levy;
|
|
1
|
+
const e = require('cors');
|
|
2
|
+
const mongoose = require('mongoose');
|
|
3
|
+
|
|
4
|
+
const LevySchema = new mongoose.Schema({
|
|
5
|
+
levyName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: [true, 'Levy name is required'],
|
|
8
|
+
trim: true,
|
|
9
|
+
},
|
|
10
|
+
amount: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: [true, 'amount is required'],
|
|
13
|
+
},
|
|
14
|
+
levyType: {
|
|
15
|
+
type: mongoose.Schema.Types.ObjectId, // Update this to reference LevyType
|
|
16
|
+
ref: 'LevyType',
|
|
17
|
+
required: [true, 'Levy type is required'],
|
|
18
|
+
},
|
|
19
|
+
levyApplicant: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: [true, 'Levy applicant is required'],
|
|
22
|
+
trim: true,
|
|
23
|
+
},
|
|
24
|
+
collectionFrequency: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: [true, 'Collection Frequency is required'],
|
|
27
|
+
trim: true,
|
|
28
|
+
enum: ['Monthly', 'Quarterly', 'Annually', 'Semi-annually', 'Weekly']
|
|
29
|
+
},
|
|
30
|
+
invoiceDate: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: [true, 'Invoice Date is required'],
|
|
33
|
+
trim: true,
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
facilityId: {
|
|
40
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
41
|
+
ref: 'Facility',
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const Levy = mongoose.model('Levy', LevySchema);
|
|
48
|
+
|
|
49
|
+
module.exports = Levy;
|
package/src/models/levytype.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
const LevyTypeSchema = new mongoose.Schema({
|
|
4
|
-
levyType: {
|
|
5
|
-
type: String,
|
|
6
|
-
required: [true, 'Levy type is required'],
|
|
7
|
-
trim: true,
|
|
8
|
-
},
|
|
9
|
-
facilityId: {
|
|
10
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
-
ref: 'Facility',
|
|
12
|
-
}
|
|
13
|
-
}, {
|
|
14
|
-
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const LevyType = mongoose.model('LevyType', LevyTypeSchema);
|
|
18
|
-
|
|
19
|
-
module.exports = LevyType;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const LevyTypeSchema = new mongoose.Schema({
|
|
4
|
+
levyType: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: [true, 'Levy type is required'],
|
|
7
|
+
trim: true,
|
|
8
|
+
},
|
|
9
|
+
facilityId: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'Facility',
|
|
12
|
+
}
|
|
13
|
+
}, {
|
|
14
|
+
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const LevyType = mongoose.model('LevyType', LevyTypeSchema);
|
|
18
|
+
|
|
19
|
+
module.exports = LevyType;
|
package/src/models/message.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
const MessageSchema = mongoose.Schema({
|
|
3
|
-
type: {
|
|
4
|
-
type: String,
|
|
5
|
-
required: true
|
|
6
|
-
},
|
|
7
|
-
recipient: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
subject: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
body: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true
|
|
18
|
-
},
|
|
19
|
-
sentOn: {
|
|
20
|
-
type: Date,
|
|
21
|
-
required: false
|
|
22
|
-
},
|
|
23
|
-
createdOn:{
|
|
24
|
-
type:Date,
|
|
25
|
-
required:true
|
|
26
|
-
},
|
|
27
|
-
status: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: true,
|
|
30
|
-
enum: ['Not Sent', 'In Queue', 'Sent']
|
|
31
|
-
},
|
|
32
|
-
messageId: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: false
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
})
|
|
38
|
-
const Message = mongoose.model('Message', MessageSchema);
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
const MessageSchema = mongoose.Schema({
|
|
3
|
+
type: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
recipient: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
subject: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false
|
|
14
|
+
},
|
|
15
|
+
body: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
sentOn: {
|
|
20
|
+
type: Date,
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
createdOn:{
|
|
24
|
+
type:Date,
|
|
25
|
+
required:true
|
|
26
|
+
},
|
|
27
|
+
status: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
enum: ['Not Sent', 'In Queue', 'Sent']
|
|
31
|
+
},
|
|
32
|
+
messageId: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
})
|
|
38
|
+
const Message = mongoose.model('Message', MessageSchema);
|
|
39
39
|
module.exports = Message
|
package/src/models/module.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for modules
|
|
4
|
-
const moduleSchema = new mongoose.Schema({
|
|
5
|
-
name: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: [true, 'Module name is required'],
|
|
8
|
-
trim: true,
|
|
9
|
-
unique: true // Ensure module name is unique
|
|
10
|
-
}
|
|
11
|
-
}, {
|
|
12
|
-
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// Indexes for improved performance
|
|
16
|
-
moduleSchema.index({ name: 1 });
|
|
17
|
-
|
|
18
|
-
// Compile the model from the schema
|
|
19
|
-
const Module = mongoose.model('Module', moduleSchema);
|
|
20
|
-
|
|
21
|
-
module.exports = Module;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for modules
|
|
4
|
+
const moduleSchema = new mongoose.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: [true, 'Module name is required'],
|
|
8
|
+
trim: true,
|
|
9
|
+
unique: true // Ensure module name is unique
|
|
10
|
+
}
|
|
11
|
+
}, {
|
|
12
|
+
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Indexes for improved performance
|
|
16
|
+
moduleSchema.index({ name: 1 });
|
|
17
|
+
|
|
18
|
+
// Compile the model from the schema
|
|
19
|
+
const Module = mongoose.model('Module', moduleSchema);
|
|
20
|
+
|
|
21
|
+
module.exports = Module;
|
package/src/models/penalty.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for companies
|
|
4
|
-
const penaltySchema = new mongoose.Schema({
|
|
5
|
-
title: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: true
|
|
8
|
-
},
|
|
9
|
-
module: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
type: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
effectDays: {
|
|
18
|
-
type: Number,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
percentage: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
amount: {
|
|
26
|
-
type: Number,
|
|
27
|
-
required: true
|
|
28
|
-
},
|
|
29
|
-
isActive: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
|
-
disabled:{
|
|
34
|
-
type:Boolean,
|
|
35
|
-
required:true
|
|
36
|
-
},
|
|
37
|
-
facilityId: {
|
|
38
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
39
|
-
ref: 'Facility',
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// Indexes for improved performance
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// Compile the model from the schema
|
|
49
|
-
const Penalty = mongoose.model('Penalty', penaltySchema);
|
|
50
|
-
|
|
51
|
-
module.exports = Penalty;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for companies
|
|
4
|
+
const penaltySchema = new mongoose.Schema({
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
module: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
type: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
effectDays: {
|
|
18
|
+
type: Number,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
percentage: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
amount: {
|
|
26
|
+
type: Number,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
isActive: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
disabled:{
|
|
34
|
+
type:Boolean,
|
|
35
|
+
required:true
|
|
36
|
+
},
|
|
37
|
+
facilityId: {
|
|
38
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
39
|
+
ref: 'Facility',
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Indexes for improved performance
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// Compile the model from the schema
|
|
49
|
+
const Penalty = mongoose.model('Penalty', penaltySchema);
|
|
50
|
+
|
|
51
|
+
module.exports = Penalty;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
const refreshTokenSchema = new mongoose.Schema({
|
|
4
|
-
userId: {
|
|
5
|
-
type: String,
|
|
6
|
-
required: true,
|
|
7
|
-
index: true, // Index for faster lookup by userId
|
|
8
|
-
},
|
|
9
|
-
token: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
createdAt: {
|
|
14
|
-
type: Date,
|
|
15
|
-
required: true,
|
|
16
|
-
default: Date.now,
|
|
17
|
-
expires: '30d', // Example: Token expires after 30 days
|
|
18
|
-
},
|
|
19
|
-
},{timestamps: true});
|
|
20
|
-
|
|
21
|
-
const RefreshToken = mongoose.model('RefreshToken', refreshTokenSchema);
|
|
22
|
-
|
|
23
|
-
module.exports = RefreshToken;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const refreshTokenSchema = new mongoose.Schema({
|
|
4
|
+
userId: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
index: true, // Index for faster lookup by userId
|
|
8
|
+
},
|
|
9
|
+
token: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
createdAt: {
|
|
14
|
+
type: Date,
|
|
15
|
+
required: true,
|
|
16
|
+
default: Date.now,
|
|
17
|
+
expires: '30d', // Example: Token expires after 30 days
|
|
18
|
+
},
|
|
19
|
+
},{timestamps: true});
|
|
20
|
+
|
|
21
|
+
const RefreshToken = mongoose.model('RefreshToken', refreshTokenSchema);
|
|
22
|
+
|
|
23
|
+
module.exports = RefreshToken;
|
package/src/models/reminder.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for companies
|
|
4
|
-
const reminderSchema = new mongoose.Schema({
|
|
5
|
-
title: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: true
|
|
8
|
-
},
|
|
9
|
-
module: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
type: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
time: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
day: {
|
|
22
|
-
type: Number,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
isActive: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
required: true
|
|
28
|
-
},
|
|
29
|
-
disabled:{
|
|
30
|
-
type:Boolean,
|
|
31
|
-
required:true
|
|
32
|
-
},
|
|
33
|
-
facilityId: {
|
|
34
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
35
|
-
ref: 'Facility',
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// Indexes for improved performance
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Compile the model from the schema
|
|
45
|
-
const Reminder = mongoose.model('Reminder', reminderSchema);
|
|
46
|
-
|
|
47
|
-
module.exports = Reminder;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for companies
|
|
4
|
+
const reminderSchema = new mongoose.Schema({
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
module: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
type: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
time: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
day: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
isActive: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
disabled:{
|
|
30
|
+
type:Boolean,
|
|
31
|
+
required:true
|
|
32
|
+
},
|
|
33
|
+
facilityId: {
|
|
34
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
35
|
+
ref: 'Facility',
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Indexes for improved performance
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// Compile the model from the schema
|
|
45
|
+
const Reminder = mongoose.model('Reminder', reminderSchema);
|
|
46
|
+
|
|
47
|
+
module.exports = Reminder;
|
package/src/models/settings.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
const SettingsSchema = new mongoose.Schema({
|
|
4
|
-
name: {
|
|
5
|
-
type: String,
|
|
6
|
-
required:true
|
|
7
|
-
},
|
|
8
|
-
size: {
|
|
9
|
-
type: String,
|
|
10
|
-
required:true
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
}, {
|
|
14
|
-
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const Settings = mongoose.model('Settings', SettingsSchema);
|
|
18
|
-
|
|
19
|
-
module.exports = Settings;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const SettingsSchema = new mongoose.Schema({
|
|
4
|
+
name: {
|
|
5
|
+
type: String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
size: {
|
|
9
|
+
type: String,
|
|
10
|
+
required:true
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
}, {
|
|
14
|
+
timestamps: true, // Automatically add createdAt and updatedAt fields
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const Settings = mongoose.model('Settings', SettingsSchema);
|
|
18
|
+
|
|
19
|
+
module.exports = Settings;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
const SMSAfricastalkingSchema = mongoose.Schema({
|
|
3
|
-
user: {
|
|
4
|
-
type: String,
|
|
5
|
-
required: true
|
|
6
|
-
},
|
|
7
|
-
senderId: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true
|
|
10
|
-
},
|
|
11
|
-
userName: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
apiKey: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
const SMSAfricastalking = mongoose.model('SMSAfricastalking', SMSAfricastalkingSchema);
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
const SMSAfricastalkingSchema = mongoose.Schema({
|
|
3
|
+
user: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
senderId: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
userName: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
apiKey: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
const SMSAfricastalking = mongoose.model('SMSAfricastalking', SMSAfricastalkingSchema);
|
|
21
21
|
module.exports = SMSAfricastalking
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
const SMSMelioraSchema = mongoose.Schema({
|
|
3
|
-
user: {
|
|
4
|
-
type: String,
|
|
5
|
-
required: true
|
|
6
|
-
},
|
|
7
|
-
senderId: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true
|
|
10
|
-
},
|
|
11
|
-
apiKey: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
const SMSMeliora = mongoose.model('SMSMeliora', SMSMelioraSchema);
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
const SMSMelioraSchema = mongoose.Schema({
|
|
3
|
+
user: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true
|
|
6
|
+
},
|
|
7
|
+
senderId: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
apiKey: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
const SMSMeliora = mongoose.model('SMSMeliora', SMSMelioraSchema);
|
|
17
17
|
module.exports = SMSMeliora
|