payservedb 2.0.1 → 2.0.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.
Files changed (38) hide show
  1. package/index.js +98 -98
  2. package/package.json +15 -15
  3. package/src/models/apilog.js +18 -18
  4. package/src/models/archivedapilog.js +18 -18
  5. package/src/models/archivedauditlog.js +83 -83
  6. package/src/models/auditlog.js +83 -83
  7. package/src/models/bankdetails.js +40 -40
  8. package/src/models/combinedUnits.js +62 -62
  9. package/src/models/company.js +52 -52
  10. package/src/models/contract.js +42 -42
  11. package/src/models/customer.js +173 -173
  12. package/src/models/email.js +24 -24
  13. package/src/models/entry_exit.js +53 -53
  14. package/src/models/facility.js +39 -39
  15. package/src/models/facilityasset.js +25 -25
  16. package/src/models/guard.js +47 -47
  17. package/src/models/invoice.js +105 -105
  18. package/src/models/invoiceBillingSetting.js +29 -29
  19. package/src/models/levy.js +49 -49
  20. package/src/models/levytype.js +19 -19
  21. package/src/models/message.js +38 -38
  22. package/src/models/module.js +21 -21
  23. package/src/models/penalty.js +51 -51
  24. package/src/models/refresh_token.js +23 -23
  25. package/src/models/reminder.js +47 -47
  26. package/src/models/settings.js +19 -19
  27. package/src/models/sms_africastalking.js +20 -20
  28. package/src/models/sms_meliora.js +16 -16
  29. package/src/models/tax.js +35 -35
  30. package/src/models/unitasset.js +25 -25
  31. package/src/models/units.js +70 -70
  32. package/src/models/user.js +93 -93
  33. package/src/models/visitLog.js +83 -83
  34. package/src/models/visitor.js +50 -50
  35. package/src/models/waitlist.js +44 -28
  36. package/src/models/waterConcentrator.js +50 -50
  37. package/src/models/waterMeter.js +50 -50
  38. package/src/models/waterMeterSetting.js +29 -29
@@ -1,40 +1,40 @@
1
- const mongoose = require('mongoose');
2
-
3
- const BankDetailsSchema = new mongoose.Schema({
4
- accountName: {
5
- type: String,
6
- required: true
7
- },
8
- accountNumber: {
9
- type: String,
10
- required: true,
11
- },
12
- bankName: {
13
- type: String,
14
- required: true,
15
- },
16
- branchName: {
17
- type: String,
18
- required: true,
19
- },
20
- branchCode: {
21
- type: String,
22
- required: false,
23
- },
24
- bankCode: {
25
- type: String,
26
- required: false,
27
- },
28
- isDefault: {
29
- type: Boolean,
30
- default: false
31
- },
32
- facilityId: {
33
- type: mongoose.Schema.Types.ObjectId,
34
- ref: 'Facility'
35
- },
36
- });
37
-
38
- const BankDetails = mongoose.model('BankDetails', BankDetailsSchema);
39
-
40
- module.exports = BankDetails;
1
+ const mongoose = require('mongoose');
2
+
3
+ const BankDetailsSchema = new mongoose.Schema({
4
+ accountName: {
5
+ type: String,
6
+ required: true
7
+ },
8
+ accountNumber: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ bankName: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ branchName: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ branchCode: {
21
+ type: String,
22
+ required: false,
23
+ },
24
+ bankCode: {
25
+ type: String,
26
+ required: false,
27
+ },
28
+ isDefault: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ facilityId: {
33
+ type: mongoose.Schema.Types.ObjectId,
34
+ ref: 'Facility'
35
+ },
36
+ });
37
+
38
+ const BankDetails = mongoose.model('BankDetails', BankDetailsSchema);
39
+
40
+ module.exports = BankDetails;
@@ -1,62 +1,62 @@
1
- const mongoose = require('mongoose');
2
-
3
- // Define the schema for companies
4
- const combinedUnitSchema = new mongoose.Schema({
5
- combinedUnitName: {
6
- type: String,
7
- required: true
8
- },
9
- combinedDivision:{
10
- type:String,
11
- required:true
12
- },
13
- combinedUnitType:{
14
- type:String,
15
- required:true
16
- },
17
- combinedFloorUnit:{
18
- type:String,
19
- required:true
20
- },
21
- combinedLettableFloorArea:{
22
- type:String,
23
- required:false
24
- },
25
- combinedLRNumber:{
26
- type:String,
27
- required:true
28
- },
29
- combinedGrossArea:{
30
- type:Number,
31
- required:false
32
- },
33
- combinedNetLettableArea:{
34
- type:Number,
35
- required:false
36
- },
37
- combinedReason:{
38
- type:String,
39
- required:false
40
- },
41
- status:{
42
- type:String,
43
- required:true
44
- },
45
- selectedCombinedUnits:[],
46
- facilityId:{
47
- type: mongoose.Schema.Types.ObjectId,
48
- ref: 'Facility',
49
- }
50
-
51
-
52
- }, {
53
- timestamps: true // Automatically add createdAt and updatedAt fields
54
- });
55
-
56
- // Indexes for improved performance
57
- combinedUnitSchema.index({ name: 1 });
58
-
59
- // Compile the model from the schema
60
- const CombinedUnit = mongoose.model('CombinedUnit', combinedUnitSchema);
61
-
62
- module.exports = CombinedUnit;
1
+ const mongoose = require('mongoose');
2
+
3
+ // Define the schema for companies
4
+ const combinedUnitSchema = new mongoose.Schema({
5
+ combinedUnitName: {
6
+ type: String,
7
+ required: true
8
+ },
9
+ combinedDivision:{
10
+ type:String,
11
+ required:true
12
+ },
13
+ combinedUnitType:{
14
+ type:String,
15
+ required:true
16
+ },
17
+ combinedFloorUnit:{
18
+ type:String,
19
+ required:true
20
+ },
21
+ combinedLettableFloorArea:{
22
+ type:String,
23
+ required:false
24
+ },
25
+ combinedLRNumber:{
26
+ type:String,
27
+ required:true
28
+ },
29
+ combinedGrossArea:{
30
+ type:Number,
31
+ required:false
32
+ },
33
+ combinedNetLettableArea:{
34
+ type:Number,
35
+ required:false
36
+ },
37
+ combinedReason:{
38
+ type:String,
39
+ required:false
40
+ },
41
+ status:{
42
+ type:String,
43
+ required:true
44
+ },
45
+ selectedCombinedUnits:[],
46
+ facilityId:{
47
+ type: mongoose.Schema.Types.ObjectId,
48
+ ref: 'Facility',
49
+ }
50
+
51
+
52
+ }, {
53
+ timestamps: true // Automatically add createdAt and updatedAt fields
54
+ });
55
+
56
+ // Indexes for improved performance
57
+ combinedUnitSchema.index({ name: 1 });
58
+
59
+ // Compile the model from the schema
60
+ const CombinedUnit = mongoose.model('CombinedUnit', combinedUnitSchema);
61
+
62
+ module.exports = CombinedUnit;
@@ -1,52 +1,52 @@
1
- const mongoose = require('mongoose');
2
-
3
- // Define the schema for companies
4
- const companySchema = new mongoose.Schema({
5
- name: {
6
- type: String,
7
- required: [true, 'Company name is required'],
8
- trim: true,
9
- minlength: [1, 'Company name must be at least 1 character long']
10
- },
11
- address: {
12
- type: String,
13
- required: false
14
- },
15
- country: { type: String, required: false },
16
- email: { type: String, required: true },
17
- city: { type: String, required: true },
18
- registrationNumber:{ type: String, required: true },
19
- companyTaxNumber:{type:String,required:true},
20
- logo: {
21
- type: String,
22
- trim: false,
23
- default: null
24
- },
25
- isEnabled: { type: Boolean, default: false },
26
- kyc: {
27
- taxCertificate: {
28
- type: String
29
- },
30
- Id: {
31
- type: String
32
- },
33
- companyCertificate: {
34
- type: String
35
- }
36
- },
37
-
38
- facilities: [{
39
- type: mongoose.Schema.Types.ObjectId,
40
- ref: 'Facility'
41
- }]
42
- }, {
43
- timestamps: true // Automatically add createdAt and updatedAt fields
44
- });
45
-
46
- // Indexes for improved performance
47
- companySchema.index({ name: 1 });
48
-
49
- // Compile the model from the schema
50
- const Company = mongoose.model('Company', companySchema);
51
-
52
- module.exports = Company;
1
+ const mongoose = require('mongoose');
2
+
3
+ // Define the schema for companies
4
+ const companySchema = new mongoose.Schema({
5
+ name: {
6
+ type: String,
7
+ required: [true, 'Company name is required'],
8
+ trim: true,
9
+ minlength: [1, 'Company name must be at least 1 character long']
10
+ },
11
+ address: {
12
+ type: String,
13
+ required: false
14
+ },
15
+ country: { type: String, required: false },
16
+ email: { type: String, required: true },
17
+ city: { type: String, required: true },
18
+ registrationNumber:{ type: String, required: true },
19
+ companyTaxNumber:{type:String,required:true},
20
+ logo: {
21
+ type: String,
22
+ trim: false,
23
+ default: null
24
+ },
25
+ isEnabled: { type: Boolean, default: false },
26
+ kyc: {
27
+ taxCertificate: {
28
+ type: String
29
+ },
30
+ Id: {
31
+ type: String
32
+ },
33
+ companyCertificate: {
34
+ type: String
35
+ }
36
+ },
37
+
38
+ facilities: [{
39
+ type: mongoose.Schema.Types.ObjectId,
40
+ ref: 'Facility'
41
+ }]
42
+ }, {
43
+ timestamps: true // Automatically add createdAt and updatedAt fields
44
+ });
45
+
46
+ // Indexes for improved performance
47
+ companySchema.index({ name: 1 });
48
+
49
+ // Compile the model from the schema
50
+ const Company = mongoose.model('Company', companySchema);
51
+
52
+ module.exports = Company;
@@ -1,42 +1,42 @@
1
- const mongoose = require('mongoose');
2
-
3
- const contractSchema = new mongoose.Schema({
4
- contractName: {
5
- type: String,
6
- required: true
7
- },
8
- contractStart: {
9
- type: String,
10
- required: true
11
- },
12
- contractEnd: {
13
- type: String,
14
- required: true
15
- },
16
- levy: {
17
- type: mongoose.Schema.Types.ObjectId,
18
- ref: 'Levy',
19
- required: [true, 'Levy is required'],
20
- },
21
- units:[],
22
- disabled: {
23
- type: Boolean,
24
- default: false
25
- },
26
- facilityId: {
27
- type: mongoose.Schema.Types.ObjectId,
28
- ref: 'Facility',
29
- required: true
30
- },
31
- },
32
- // { timestamps: true }
33
- );
34
-
35
- contractSchema.index({ contractName: 1 });
36
-
37
- const Contract = mongoose.model('Contract', contractSchema);
38
-
39
- module.exports = Contract;
40
-
41
-
42
-
1
+ const mongoose = require('mongoose');
2
+
3
+ const contractSchema = new mongoose.Schema({
4
+ contractName: {
5
+ type: String,
6
+ required: true
7
+ },
8
+ contractStart: {
9
+ type: String,
10
+ required: true
11
+ },
12
+ contractEnd: {
13
+ type: String,
14
+ required: true
15
+ },
16
+ levy: {
17
+ type: mongoose.Schema.Types.ObjectId,
18
+ ref: 'Levy',
19
+ required: [true, 'Levy is required'],
20
+ },
21
+ units:[],
22
+ disabled: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ facilityId: {
27
+ type: mongoose.Schema.Types.ObjectId,
28
+ ref: 'Facility',
29
+ required: true
30
+ },
31
+ },
32
+ // { timestamps: true }
33
+ );
34
+
35
+ contractSchema.index({ contractName: 1 });
36
+
37
+ const Contract = mongoose.model('Contract', contractSchema);
38
+
39
+ module.exports = Contract;
40
+
41
+
42
+