payservedb 1.4.0 → 1.4.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.
package/index.js CHANGED
@@ -69,6 +69,7 @@ const models = {
69
69
  Guard:require('./src/models/guard'),
70
70
  Visitor:require('./src/models/visitor'),
71
71
  VisitLog:require('./src/models/visitLog'),
72
+ Settings:require('./src/models/settings'),
72
73
  Contract:require('./src/models/contract'),
73
74
  Levy:require('./src/models/levy'),
74
75
  LevyType:require('./src/models/levytype')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -4,7 +4,7 @@ const { Schema } = mongoose;
4
4
 
5
5
  const apiLogSchema = new Schema({
6
6
  url: { type: String, required: true, index: true },
7
- method: { type: String, required: true, enum: ['GET', 'POST', 'PUT', 'DELETE'], index: true },
7
+ method: { type: String, required: true, index: true },
8
8
  duration: { type: Number, required: true },
9
9
  time: { type: Date, default: Date.now, required: true, index: true },
10
10
  date: { type: String, required: true, index: true },
@@ -9,6 +9,11 @@ const contractSchema = new mongoose.Schema({
9
9
  type: String,
10
10
  required: true
11
11
  },
12
+ idNumber: {
13
+ type: Number,
14
+ required: true
15
+
16
+ },
12
17
  contractStart: {
13
18
  type: Date,
14
19
  required: true
@@ -29,4 +34,7 @@ contractSchema.index({ contractName: 1 });
29
34
 
30
35
  const Contract = mongoose.model('Contract', contractSchema);
31
36
 
32
- module.exports = Contract;
37
+ module.exports = Contract;
38
+
39
+
40
+
@@ -0,0 +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;