payservedb 4.5.0 → 4.5.1
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/.env +2 -2
- package/index.js +152 -152
- package/package.json +17 -17
- package/src/models/account.js +36 -36
- package/src/models/analog_water_billing.js +58 -58
- package/src/models/apilog.js +18 -18
- package/src/models/archivedapilog.js +18 -18
- package/src/models/archivedauditlog.js +83 -83
- package/src/models/asset.js +34 -34
- package/src/models/auditlog.js +83 -83
- package/src/models/bankdetails.js +40 -40
- package/src/models/budget.js +33 -33
- package/src/models/budgetCategory.js +19 -19
- package/src/models/campaigns.js +72 -72
- package/src/models/cashpayment.js +262 -262
- package/src/models/combinedUnits.js +62 -62
- package/src/models/company.js +53 -53
- package/src/models/country_tax.js +42 -42
- package/src/models/currency_settings.js +39 -39
- package/src/models/customer.js +194 -194
- package/src/models/default_payment_details.js +17 -17
- package/src/models/dutyroster.js +39 -39
- package/src/models/email.js +24 -24
- package/src/models/entry_exit.js +53 -53
- package/src/models/expense.js +55 -55
- package/src/models/facility.js +60 -60
- package/src/models/facility_payment_details.js +20 -20
- package/src/models/facilityasset.js +25 -25
- package/src/models/faq.js +18 -18
- package/src/models/guard.js +47 -47
- package/src/models/handover.js +241 -241
- package/src/models/invoice.js +251 -251
- package/src/models/item_inspection.js +67 -67
- package/src/models/leaseagreement.js +168 -156
- package/src/models/leasetemplate.js +17 -17
- package/src/models/levy.js +72 -72
- package/src/models/levy_invoice_settings.js +26 -26
- package/src/models/levycontract.js +65 -65
- package/src/models/levytype.js +23 -23
- package/src/models/maintenance_service_vendor.js +38 -38
- package/src/models/maintenance_services.js +17 -17
- package/src/models/maintenancerequisition.js +31 -31
- package/src/models/message.js +38 -38
- package/src/models/module.js +21 -21
- package/src/models/notification.js +24 -24
- package/src/models/penalty.js +76 -76
- package/src/models/refresh_token.js +23 -23
- package/src/models/reminder.js +161 -161
- package/src/models/report.js +13 -13
- package/src/models/resident.js +121 -121
- package/src/models/service_charge_invoice_upload.js +42 -42
- package/src/models/service_charge_payments.js +27 -27
- package/src/models/servicerequest.js +55 -55
- package/src/models/settings.js +62 -62
- package/src/models/smart_meter_daily_consumption.js +44 -44
- package/src/models/sms_africastalking.js +20 -20
- package/src/models/sms_meliora.js +16 -16
- package/src/models/staff.js +36 -36
- package/src/models/stocksandspare.js +34 -34
- package/src/models/tickets.js +109 -109
- package/src/models/unitasset.js +25 -25
- package/src/models/units.js +70 -70
- package/src/models/user.js +94 -94
- package/src/models/valueaddedservices.js +36 -36
- package/src/models/vas_invoices_upload.js +50 -50
- package/src/models/vas_payments.js +24 -24
- package/src/models/vasinvoice.js +159 -159
- package/src/models/vasvendor.js +57 -57
- package/src/models/visitLog.js +86 -86
- package/src/models/visitor.js +63 -63
- package/src/models/waitlist.js +45 -45
- package/src/models/water_invoice.js +192 -192
- package/src/models/water_meter_account.js +74 -74
- package/src/models/water_meter_communication.js +17 -17
- package/src/models/water_meter_concentrator.js +59 -59
- package/src/models/water_meter_iot_cards.js +34 -34
- package/src/models/water_meter_manufacturer.js +35 -35
- package/src/models/water_meter_settings.js +88 -88
- package/src/models/water_meter_size.js +15 -15
- package/src/models/water_meters.js +110 -110
- package/src/models/water_meters_delivery.js +76 -76
- package/src/models/workorder.js +49 -49
package/src/models/expense.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
const expenseSchema = new mongoose.Schema({
|
|
4
|
-
facilityId: {
|
|
5
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
-
ref: 'Facility',
|
|
7
|
-
required: true
|
|
8
|
-
},
|
|
9
|
-
categoryId: {
|
|
10
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
-
ref: 'BudgetCategory',
|
|
12
|
-
required: true
|
|
13
|
-
},
|
|
14
|
-
name: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: true,
|
|
17
|
-
trim: true
|
|
18
|
-
},
|
|
19
|
-
amount: {
|
|
20
|
-
type: Number,
|
|
21
|
-
required: true
|
|
22
|
-
},
|
|
23
|
-
type: {
|
|
24
|
-
type: String,
|
|
25
|
-
enum: ['RECURRING', 'ONE_TIME'],
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
date: {
|
|
29
|
-
type: Date,
|
|
30
|
-
required: true,
|
|
31
|
-
default: Date.now
|
|
32
|
-
},
|
|
33
|
-
status: {
|
|
34
|
-
type: String,
|
|
35
|
-
enum: ['PAID', 'UNPAID'],
|
|
36
|
-
default: 'UNPAID'
|
|
37
|
-
},
|
|
38
|
-
approval: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false
|
|
41
|
-
},
|
|
42
|
-
description: {
|
|
43
|
-
type: String,
|
|
44
|
-
trim: true
|
|
45
|
-
},
|
|
46
|
-
receiptUrl: {
|
|
47
|
-
type: String,
|
|
48
|
-
trim: true
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
timestamps: true
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const Expense = mongoose.model('Expense', expenseSchema);
|
|
55
|
-
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const expenseSchema = new mongoose.Schema({
|
|
4
|
+
facilityId: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
ref: 'Facility',
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
categoryId: {
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'BudgetCategory',
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
trim: true
|
|
18
|
+
},
|
|
19
|
+
amount: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
type: String,
|
|
25
|
+
enum: ['RECURRING', 'ONE_TIME'],
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
date: {
|
|
29
|
+
type: Date,
|
|
30
|
+
required: true,
|
|
31
|
+
default: Date.now
|
|
32
|
+
},
|
|
33
|
+
status: {
|
|
34
|
+
type: String,
|
|
35
|
+
enum: ['PAID', 'UNPAID'],
|
|
36
|
+
default: 'UNPAID'
|
|
37
|
+
},
|
|
38
|
+
approval: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
description: {
|
|
43
|
+
type: String,
|
|
44
|
+
trim: true
|
|
45
|
+
},
|
|
46
|
+
receiptUrl: {
|
|
47
|
+
type: String,
|
|
48
|
+
trim: true
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
timestamps: true
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const Expense = mongoose.model('Expense', expenseSchema);
|
|
55
|
+
|
|
56
56
|
module.exports = Expense;
|
package/src/models/facility.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for facilities
|
|
4
|
-
const facilitySchema = new mongoose.Schema({
|
|
5
|
-
name: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: [true, 'Facility name is required'],
|
|
8
|
-
trim: true,
|
|
9
|
-
minlength: [1, 'Facility name must be at least 1 character long']
|
|
10
|
-
},
|
|
11
|
-
location: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true
|
|
14
|
-
},
|
|
15
|
-
subDivision: { type: String, required: true },
|
|
16
|
-
isEnabled: { type: Boolean, required: true },
|
|
17
|
-
divisionArray: [],
|
|
18
|
-
landReferenceNumbers: [],
|
|
19
|
-
defaultMeasurement: { type: String, required: false },
|
|
20
|
-
totalCommonArea: { type: String, required: false },
|
|
21
|
-
totalLettableArea: { type: String, required: false },
|
|
22
|
-
modules: {
|
|
23
|
-
visitor: { type: Boolean, },
|
|
24
|
-
levy: { type: Boolean, },
|
|
25
|
-
maintenance: { type: Boolean, },
|
|
26
|
-
lease: { type: Boolean, },
|
|
27
|
-
vas: { type: Boolean, },
|
|
28
|
-
tickets: { type: Boolean, },
|
|
29
|
-
utility: { type: Boolean, },
|
|
30
|
-
booking: { type: Boolean, },
|
|
31
|
-
handover: { type: Boolean, },
|
|
32
|
-
expense: { type: Boolean, },
|
|
33
|
-
campaign: { type: Boolean, },
|
|
34
|
-
procurement: { type: Boolean, },
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
logo: {
|
|
38
|
-
type: String,
|
|
39
|
-
trim: false,
|
|
40
|
-
default: null
|
|
41
|
-
},
|
|
42
|
-
dbName: {
|
|
43
|
-
type: String,
|
|
44
|
-
required: [true, 'Database name is required'],
|
|
45
|
-
unique: true,
|
|
46
|
-
trim: true
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
}, {
|
|
50
|
-
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Indexes for improved performance
|
|
54
|
-
facilitySchema.index({ name: 1 });
|
|
55
|
-
facilitySchema.index({ dbName: 1 });
|
|
56
|
-
|
|
57
|
-
// Compile the model from the schema
|
|
58
|
-
const Facility = mongoose.model('Facility', facilitySchema);
|
|
59
|
-
|
|
60
|
-
module.exports = Facility;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for facilities
|
|
4
|
+
const facilitySchema = new mongoose.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: [true, 'Facility name is required'],
|
|
8
|
+
trim: true,
|
|
9
|
+
minlength: [1, 'Facility name must be at least 1 character long']
|
|
10
|
+
},
|
|
11
|
+
location: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
subDivision: { type: String, required: true },
|
|
16
|
+
isEnabled: { type: Boolean, required: true },
|
|
17
|
+
divisionArray: [],
|
|
18
|
+
landReferenceNumbers: [],
|
|
19
|
+
defaultMeasurement: { type: String, required: false },
|
|
20
|
+
totalCommonArea: { type: String, required: false },
|
|
21
|
+
totalLettableArea: { type: String, required: false },
|
|
22
|
+
modules: {
|
|
23
|
+
visitor: { type: Boolean, },
|
|
24
|
+
levy: { type: Boolean, },
|
|
25
|
+
maintenance: { type: Boolean, },
|
|
26
|
+
lease: { type: Boolean, },
|
|
27
|
+
vas: { type: Boolean, },
|
|
28
|
+
tickets: { type: Boolean, },
|
|
29
|
+
utility: { type: Boolean, },
|
|
30
|
+
booking: { type: Boolean, },
|
|
31
|
+
handover: { type: Boolean, },
|
|
32
|
+
expense: { type: Boolean, },
|
|
33
|
+
campaign: { type: Boolean, },
|
|
34
|
+
procurement: { type: Boolean, },
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
logo: {
|
|
38
|
+
type: String,
|
|
39
|
+
trim: false,
|
|
40
|
+
default: null
|
|
41
|
+
},
|
|
42
|
+
dbName: {
|
|
43
|
+
type: String,
|
|
44
|
+
required: [true, 'Database name is required'],
|
|
45
|
+
unique: true,
|
|
46
|
+
trim: true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}, {
|
|
50
|
+
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Indexes for improved performance
|
|
54
|
+
facilitySchema.index({ name: 1 });
|
|
55
|
+
facilitySchema.index({ dbName: 1 });
|
|
56
|
+
|
|
57
|
+
// Compile the model from the schema
|
|
58
|
+
const Facility = mongoose.model('Facility', facilitySchema);
|
|
59
|
+
|
|
60
|
+
module.exports = Facility;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const mongoose = require("mongoose");
|
|
2
|
-
|
|
3
|
-
const facilityPaymentDetailsSchema = new mongoose.Schema({
|
|
4
|
-
facility: {
|
|
5
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
-
},
|
|
7
|
-
shortCode: { type: String },
|
|
8
|
-
passkey: { type: String },
|
|
9
|
-
authorizationKey: {
|
|
10
|
-
type: String,
|
|
11
|
-
},
|
|
12
|
-
module: {
|
|
13
|
-
type: String,
|
|
14
|
-
enum: ["All", "Water", "Electricity", "Levy","Lease"],
|
|
15
|
-
default: "All"
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const FacilityPaymentDetails = mongoose.model('FacilityPaymentDetails', facilityPaymentDetailsSchema);
|
|
20
|
-
|
|
1
|
+
const mongoose = require("mongoose");
|
|
2
|
+
|
|
3
|
+
const facilityPaymentDetailsSchema = new mongoose.Schema({
|
|
4
|
+
facility: {
|
|
5
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
},
|
|
7
|
+
shortCode: { type: String },
|
|
8
|
+
passkey: { type: String },
|
|
9
|
+
authorizationKey: {
|
|
10
|
+
type: String,
|
|
11
|
+
},
|
|
12
|
+
module: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: ["All", "Water", "Electricity", "Levy","Lease"],
|
|
15
|
+
default: "All"
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const FacilityPaymentDetails = mongoose.model('FacilityPaymentDetails', facilityPaymentDetailsSchema);
|
|
20
|
+
|
|
21
21
|
module.exports = FacilityPaymentDetails;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for companies
|
|
4
|
-
const facilityassetSchema = new mongoose.Schema({
|
|
5
|
-
name: {
|
|
6
|
-
type: String,
|
|
7
|
-
required:true
|
|
8
|
-
},
|
|
9
|
-
facilityId:{
|
|
10
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
-
ref: 'Facility',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, {
|
|
16
|
-
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// Indexes for improved performance
|
|
20
|
-
facilityassetSchema.index({ name: 1 });
|
|
21
|
-
|
|
22
|
-
// Compile the model from the schema
|
|
23
|
-
const FacilityAsset = mongoose.model('FacilityAsset', facilityassetSchema);
|
|
24
|
-
|
|
25
|
-
module.exports = FacilityAsset;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for companies
|
|
4
|
+
const facilityassetSchema = new mongoose.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required:true
|
|
8
|
+
},
|
|
9
|
+
facilityId:{
|
|
10
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
11
|
+
ref: 'Facility',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
}, {
|
|
16
|
+
timestamps: true // Automatically add createdAt and updatedAt fields
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Indexes for improved performance
|
|
20
|
+
facilityassetSchema.index({ name: 1 });
|
|
21
|
+
|
|
22
|
+
// Compile the model from the schema
|
|
23
|
+
const FacilityAsset = mongoose.model('FacilityAsset', facilityassetSchema);
|
|
24
|
+
|
|
25
|
+
module.exports = FacilityAsset;
|
package/src/models/faq.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
// models/apiLog.js
|
|
2
|
-
const mongoose = require('mongoose');
|
|
3
|
-
const { Schema } = mongoose;
|
|
4
|
-
|
|
5
|
-
const faqSchema = new Schema({
|
|
6
|
-
question:{type:String,required:true},
|
|
7
|
-
answer:{type:String,required:true},
|
|
8
|
-
facilityId: {
|
|
9
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
10
|
-
ref: 'Facility'
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const FAQ = mongoose.model('FAQ', faqSchema);
|
|
17
|
-
|
|
18
|
-
module.exports = FAQ;
|
|
1
|
+
// models/apiLog.js
|
|
2
|
+
const mongoose = require('mongoose');
|
|
3
|
+
const { Schema } = mongoose;
|
|
4
|
+
|
|
5
|
+
const faqSchema = new Schema({
|
|
6
|
+
question:{type:String,required:true},
|
|
7
|
+
answer:{type:String,required:true},
|
|
8
|
+
facilityId: {
|
|
9
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
10
|
+
ref: 'Facility'
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const FAQ = mongoose.model('FAQ', faqSchema);
|
|
17
|
+
|
|
18
|
+
module.exports = FAQ;
|
package/src/models/guard.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const mongoose = require('mongoose');
|
|
2
|
-
|
|
3
|
-
// Define the schema for guards
|
|
4
|
-
const guardSchema = new mongoose.Schema({
|
|
5
|
-
firstName: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: true
|
|
8
|
-
},
|
|
9
|
-
lastName: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
phoneNumber: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
email:{
|
|
18
|
-
type:String,
|
|
19
|
-
required:false
|
|
20
|
-
},
|
|
21
|
-
entryPoints: [],
|
|
22
|
-
startTime: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
endTime: {
|
|
27
|
-
type: String,
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
status: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: true,
|
|
33
|
-
enum: ["On Duty", "Off Duty", "On Break", "Absent", "Sick Leave", "Suspended"]
|
|
34
|
-
},
|
|
35
|
-
facilityId: {
|
|
36
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
37
|
-
ref: 'Facility',
|
|
38
|
-
required: true // Assuming facilityId is required
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
41
|
-
timestamps: true // Automatically adds createdAt and updatedAt fields
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// Compile the model from the schema
|
|
45
|
-
const Guard = mongoose.model('Guard', guardSchema);
|
|
46
|
-
|
|
47
|
-
module.exports = Guard;
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
// Define the schema for guards
|
|
4
|
+
const guardSchema = new mongoose.Schema({
|
|
5
|
+
firstName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
lastName: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
phoneNumber: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
email:{
|
|
18
|
+
type:String,
|
|
19
|
+
required:false
|
|
20
|
+
},
|
|
21
|
+
entryPoints: [],
|
|
22
|
+
startTime: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
endTime: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
status: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
enum: ["On Duty", "Off Duty", "On Break", "Absent", "Sick Leave", "Suspended"]
|
|
34
|
+
},
|
|
35
|
+
facilityId: {
|
|
36
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
37
|
+
ref: 'Facility',
|
|
38
|
+
required: true // Assuming facilityId is required
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
timestamps: true // Automatically adds createdAt and updatedAt fields
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Compile the model from the schema
|
|
45
|
+
const Guard = mongoose.model('Guard', guardSchema);
|
|
46
|
+
|
|
47
|
+
module.exports = Guard;
|