tango-api-schema 1.0.0 → 1.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.
package/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import brandModel from './schema/brand.model.js'
2
2
  import storeModel from './schema/stores.model.js'
3
3
  import cameraModel from './schema/camera.model.js'
4
- import clientModel from './schema/client.model.js'
4
+
5
+ import client from './schema/client.model.js'
6
+
7
+ export default client
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
+ "type": "module",
6
7
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "start": "node index.js"
8
10
  },
9
11
  "repository": {
10
12
  "type": "git",
@@ -1,7 +1,7 @@
1
- import mongoose,{Schema,model} from 'mongoose';
1
+ import mongoose from 'mongoose';
2
2
  import uniqueValidator from 'mongoose-unique-validator';
3
3
 
4
- const clientSchema=new Schema( {
4
+ const clientSchema=new mongoose.Schema( {
5
5
  brandName: {
6
6
  type: String,
7
7
  trim: true,
@@ -17,7 +17,7 @@ const clientSchema=new Schema( {
17
17
  },
18
18
  userDetail: {
19
19
  userId: {
20
- type: Schema.Types.ObjectId,
20
+ type: mongoose.Schema.Types.ObjectId,
21
21
  ref: 'User',
22
22
  },
23
23
  firstName: {
@@ -179,5 +179,14 @@ const clientSchema=new Schema( {
179
179
  versionKey: false,
180
180
  timestamps: true,
181
181
  } );
182
+
182
183
  clientSchema.plugin( uniqueValidator );
183
- export default model( 'Client', clientSchema );
184
+
185
+
186
+ // const Client = model('Client', clientSchema);
187
+
188
+ // export default Client;
189
+
190
+
191
+
192
+ export default model( 'Client', clientSchema );