payservedb 1.2.7 → 1.3.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.
@@ -1,39 +0,0 @@
1
- const mongoose = require('mongoose');
2
-
3
- const EntryExitSchema = mongoose.Schema({
4
- name: {
5
- type: String,
6
- required: true
7
- },
8
- location: {
9
- type: String,
10
- required: true,
11
- },
12
- gps: {
13
- lat: {
14
- type: Number,
15
- required: true
16
- },
17
- lng: {
18
- type: Number,
19
- required: true
20
- }
21
- },
22
- disabled:{
23
- type:Boolean,
24
- required:true
25
- },
26
- purpose: {
27
- type: String,
28
- required: true,
29
- enum: ['entry/exit', 'entry', 'exit', 'emergency exit']
30
- },
31
- facilityId: {
32
- type: mongoose.Schema.Types.ObjectId,
33
- ref: 'Facility',
34
- }
35
- });
36
-
37
- const EntryExit = mongoose.model('EntryExit', EntryExitSchema);
38
-
39
- module.exports = EntryExit;
@@ -1,43 +0,0 @@
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
- entryPoints: [],
18
- startTime: {
19
- type: String,
20
- required: true
21
- },
22
- endTime: {
23
- type: String,
24
- required: true
25
- },
26
- status: {
27
- type: String,
28
- required: true,
29
- enum: ["On Duty", "Off Duty", "On Break", "Absent", "Sick Leave", "Suspended"]
30
- },
31
- facilityId: {
32
- type: mongoose.Schema.Types.ObjectId,
33
- ref: 'Facility',
34
- required: true // Assuming facilityId is required
35
- }
36
- }, {
37
- timestamps: true // Automatically adds createdAt and updatedAt fields
38
- });
39
-
40
- // Compile the model from the schema
41
- const Guard = mongoose.model('Guard', guardSchema);
42
-
43
- module.exports = Guard;
@@ -1,25 +0,0 @@
1
- const mongoose = require('mongoose');
2
-
3
- // Define the schema for companies
4
- const unitassetSchema = new mongoose.Schema({
5
- name: {
6
- type: String,
7
- required:true
8
- },
9
- unitId:{
10
- type: mongoose.Schema.Types.ObjectId,
11
- ref: 'Unit',
12
- }
13
-
14
-
15
- }, {
16
- timestamps: true // Automatically add createdAt and updatedAt fields
17
- });
18
-
19
- // Indexes for improved performance
20
- unitassetSchema.index({ name: 1 });
21
-
22
- // Compile the model from the schema
23
- const UnitAsset = mongoose.model('UnitAsset', unitassetSchema);
24
-
25
- module.exports = UnitAsset;