tango-api-schema 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,9 +1,9 @@
1
- import { Schema, model } from 'mongoose';
1
+ import mongoose from 'mongoose';
2
2
 
3
- const collection = new Schema(
3
+ const collection = new mongoose.Schema(
4
4
  {
5
5
  store: {
6
- type: Schema.Types.ObjectId,
6
+ type: mongoose.Schema.Types.ObjectId,
7
7
  ref: 'Store',
8
8
  required: true,
9
9
  },
@@ -20,7 +20,7 @@ const collection = new Schema(
20
20
  trim: true,
21
21
  },
22
22
  brandId: {
23
- type: Schema.Types.ObjectId,
23
+ type: mongoose.Schema.Types.ObjectId,
24
24
  ref: 'Brand',
25
25
  required: true,
26
26
  },
@@ -74,14 +74,6 @@ const collection = new Schema(
74
74
  isUp: {
75
75
  type: Boolean,
76
76
  },
77
- createdAt: {
78
- type: Date,
79
- default: Date.now,
80
- },
81
- updatedAt: {
82
- type: Date,
83
- default: Date.now,
84
- },
85
77
  captureAt: {
86
78
  type: Date,
87
79
  default: Date.now,
@@ -106,8 +98,9 @@ const collection = new Schema(
106
98
  },
107
99
  },
108
100
  {
101
+ timestamps:true,
109
102
  strict: true,
110
103
  versionKey: false,
111
104
  } );
112
105
 
113
- export default model( 'Camera', collection );
106
+ export default mongoose.model( 'Camera', collection );
@@ -182,11 +182,4 @@ const clientSchema=new mongoose.Schema( {
182
182
 
183
183
  clientSchema.plugin( uniqueValidator );
184
184
 
185
-
186
- // const Client = model('Client', clientSchema);
187
-
188
- // export default Client;
189
-
190
-
191
-
192
185
  export default mongoose.model( 'Client', clientSchema );
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  // NPM Modules
7
- import { Schema, model } from 'mongoose';
7
+ import mongoose from "mongoose";
8
8
 
9
9
  // Schema
10
- const collection = new Schema(
10
+ const collection = new mongoose.Schema(
11
11
  {
12
12
  id: {
13
13
  type: String,
@@ -106,7 +106,7 @@ const collection = new Schema(
106
106
  trim: true,
107
107
  },
108
108
  brandId: {
109
- type: Schema.Types.ObjectId,
109
+ type: mongoose.Schema.Types.ObjectId,
110
110
  ref: 'Brand',
111
111
  },
112
112
  client_id: {
@@ -126,7 +126,6 @@ const collection = new Schema(
126
126
  },
127
127
  },
128
128
  storeConnectionId: {
129
-
130
129
  anydeskId: {
131
130
  type: String,
132
131
  },
@@ -287,4 +286,4 @@ const collection = new Schema(
287
286
 
288
287
  // collection.plugin(uniqueValidator);
289
288
 
290
- export default model( 'Store', collection );
289
+ export default mongoose.model( 'Store', collection );