payservedb 1.2.5 → 1.2.6

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,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;