tango-api-schema 2.0.85 → 2.0.86

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,41 +1,41 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
-
4
- const clientRequestSchema = new mongoose.Schema(
5
- {
6
- clientId: {
7
- type:String
8
- },
9
- user:{
10
- type:mongoose.SchemaTypes.ObjectId
11
- },
12
- name:{
13
- type:String
14
- },
15
- reason:{
16
- type:String
17
- },
18
- description:{
19
- type:String
20
- },
21
- category:{
22
- type:String
23
- },
24
- status:{
25
- type:String,
26
- enum: [ 'pending','completed' ],
27
- },
28
- markasRead:{
29
- type:Boolean,
30
- default:false
31
- }
32
- },
33
- {
34
- strict: true,
35
- versionKey: false,
36
- timestamps: true,
37
- },
38
- );
39
-
40
- clientRequestSchema.plugin(mongooseUniqueValidator);
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator'
3
+
4
+ const clientRequestSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type:String
8
+ },
9
+ user:{
10
+ type:mongoose.SchemaTypes.ObjectId
11
+ },
12
+ name:{
13
+ type:String
14
+ },
15
+ reason:{
16
+ type:String
17
+ },
18
+ description:{
19
+ type:String
20
+ },
21
+ category:{
22
+ type:String
23
+ },
24
+ status:{
25
+ type:String,
26
+ enum: [ 'pending','completed' ],
27
+ },
28
+ markasRead:{
29
+ type:Boolean,
30
+ default:false
31
+ }
32
+ },
33
+ {
34
+ strict: true,
35
+ versionKey: false,
36
+ timestamps: true,
37
+ },
38
+ );
39
+
40
+ clientRequestSchema.plugin(mongooseUniqueValidator);
41
41
  export default mongoose.model('clientRequest', clientRequestSchema)
@@ -1,28 +1,28 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const countryCodes = new mongoose.Schema(
5
- {
6
- countryName: {
7
- type: String,
8
- required: true,
9
- unique: true,
10
- },
11
- countryAlpha2Code: {
12
- type: String,
13
- required: true,
14
- },
15
- countryCode: {
16
- type: String,
17
- required: true,
18
- },
19
- },
20
- {
21
- strict: true,
22
- versionKey: false,
23
- timestamps: true,
24
- },
25
- );
26
-
27
- countryCodes.plugin( mongooseUniqueValidator );
28
- export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const countryCodes = new mongoose.Schema(
5
+ {
6
+ countryName: {
7
+ type: String,
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ countryAlpha2Code: {
12
+ type: String,
13
+ required: true,
14
+ },
15
+ countryCode: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ },
20
+ {
21
+ strict: true,
22
+ versionKey: false,
23
+ timestamps: true,
24
+ },
25
+ );
26
+
27
+ countryCodes.plugin( mongooseUniqueValidator );
28
+ export default mongoose.model( 'countryCodes', countryCodes , 'countryCodes');
@@ -1,53 +1,53 @@
1
- import mongoose from 'mongoose'
2
- import mongooseUniqueValidator from 'mongoose-unique-validator'
3
-
4
- let pricingSchema = new mongoose.Schema(
5
- {
6
- clientId: {
7
- type:String
8
- },
9
- stores: [
10
- {
11
- storeId: {
12
- type: String,
13
- },
14
- products: [
15
- {
16
- productName: {
17
- type: String,
18
- },
19
- status: {
20
- type: String,
21
- },
22
- price: {
23
- type: Number,
24
- },
25
- featureStoreCount: {
26
- type: Number,
27
- },
28
- storeRange:{
29
- type:String
30
- },
31
- basePrice:{
32
- type:Number
33
- }
34
- }
35
- ]
36
- }
37
- ],
38
- dateString:{
39
- type:String
40
- },
41
- dateISO:{
42
- type:Date
43
- }
44
- },
45
- {
46
- strict: true,
47
- versionKey: false,
48
- timestamps: true,
49
- }
50
- )
51
-
52
- pricingSchema.plugin(mongooseUniqueValidator);
1
+ import mongoose from 'mongoose'
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator'
3
+
4
+ let pricingSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type:String
8
+ },
9
+ stores: [
10
+ {
11
+ storeId: {
12
+ type: String,
13
+ },
14
+ products: [
15
+ {
16
+ productName: {
17
+ type: String,
18
+ },
19
+ status: {
20
+ type: String,
21
+ },
22
+ price: {
23
+ type: Number,
24
+ },
25
+ featureStoreCount: {
26
+ type: Number,
27
+ },
28
+ storeRange:{
29
+ type:String
30
+ },
31
+ basePrice:{
32
+ type:Number
33
+ }
34
+ }
35
+ ]
36
+ }
37
+ ],
38
+ dateString:{
39
+ type:String
40
+ },
41
+ dateISO:{
42
+ type:Date
43
+ }
44
+ },
45
+ {
46
+ strict: true,
47
+ versionKey: false,
48
+ timestamps: true,
49
+ }
50
+ )
51
+
52
+ pricingSchema.plugin(mongooseUniqueValidator);
53
53
  export default mongoose.model('dailypricing', pricingSchema);
@@ -1,33 +1,33 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const edgeAppVersion = new mongoose.Schema(
5
- {
6
- appVersion: {
7
- type: String,
8
- unique: true,
9
- },
10
- isActive: {
11
- type: Boolean,
12
- default: true,
13
- },
14
- isDefault: {
15
- type: Boolean,
16
- },
17
- exeName:{
18
- type: String,
19
- },
20
- version:{
21
- type: String,
22
- unique: true,
23
- }
24
- },
25
- {
26
- strict: true,
27
- versionKey: false,
28
- timestamps: true,
29
- },
30
- );
31
-
32
- edgeAppVersion.plugin( mongooseUniqueValidator );
33
- export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const edgeAppVersion = new mongoose.Schema(
5
+ {
6
+ appVersion: {
7
+ type: String,
8
+ unique: true,
9
+ },
10
+ isActive: {
11
+ type: Boolean,
12
+ default: true,
13
+ },
14
+ isDefault: {
15
+ type: Boolean,
16
+ },
17
+ exeName:{
18
+ type: String,
19
+ },
20
+ version:{
21
+ type: String,
22
+ unique: true,
23
+ }
24
+ },
25
+ {
26
+ strict: true,
27
+ versionKey: false,
28
+ timestamps: true,
29
+ },
30
+ );
31
+
32
+ edgeAppVersion.plugin( mongooseUniqueValidator );
33
+ export default mongoose.model( 'edgeappVersion', edgeAppVersion, 'edgeappVersion' );
@@ -1,33 +1,33 @@
1
- import mongoose from "mongoose";
2
- import uniqueValidator from "mongoose-unique-validator";
3
-
4
- const edgeappAuth = new mongoose.Schema(
5
- {
6
- token: {
7
- type: String,
8
- trim: true,
9
- unique: true,
10
- required: true,
11
- },
12
- type: {
13
- type: String,
14
- enum: ["edgeappAuth-token"],
15
- default: "edgeappAuth-token",
16
- },
17
- storeId: {
18
- type: String,
19
- trim: true,
20
- },
21
- },
22
- {
23
- strict: true,
24
- versionKey: false,
25
- timestamps: true,
26
- }
27
- );
28
-
29
- edgeappAuth.plugin(uniqueValidator)
30
- edgeappAuth.index( { createdAt: 1 }, { expires: '1d' })
31
- edgeappAuth.index( { storeId: 1 })
32
-
1
+ import mongoose from "mongoose";
2
+ import uniqueValidator from "mongoose-unique-validator";
3
+
4
+ const edgeappAuth = new mongoose.Schema(
5
+ {
6
+ token: {
7
+ type: String,
8
+ trim: true,
9
+ unique: true,
10
+ required: true,
11
+ },
12
+ type: {
13
+ type: String,
14
+ enum: ["edgeappAuth-token"],
15
+ default: "edgeappAuth-token",
16
+ },
17
+ storeId: {
18
+ type: String,
19
+ trim: true,
20
+ },
21
+ },
22
+ {
23
+ strict: true,
24
+ versionKey: false,
25
+ timestamps: true,
26
+ }
27
+ );
28
+
29
+ edgeappAuth.plugin(uniqueValidator)
30
+ edgeappAuth.index( { createdAt: 1 }, { expires: '1d' })
31
+ edgeappAuth.index( { storeId: 1 })
32
+
33
33
  export default mongoose.model( 'edgeappAuth', edgeappAuth,'edgeappAuth' );
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @name api_eyeTest_models
3
+ * @description EyeTest Schema
4
+ */
5
+
6
+ import { Schema, model } from 'mongoose';
7
+
8
+
9
+ // Schema
10
+ const collection = new Schema( {
11
+ actionType: {
12
+ type: String,
13
+ required:true
14
+ },
15
+ workstationId: {
16
+ type: String,
17
+ required:true
18
+ },
19
+ staticIP: {
20
+ type: String,
21
+ },
22
+ fittingId: {
23
+ type: String,
24
+ },
25
+ userId: {
26
+ type: String,
27
+ },
28
+ userEmail:{
29
+ type: String,
30
+ },
31
+ status:{
32
+ type:Boolean
33
+ },
34
+ frameType:{
35
+ type: String,
36
+ },
37
+ productId:{
38
+ type: String,
39
+ },
40
+ timestamp:{
41
+ type: String,
42
+ }
43
+ }, {
44
+ timestamps: true,
45
+ strict: true,
46
+ versionKey: false,
47
+ } );
48
+
49
+ export default model( 'fitting', collection );
@@ -1,31 +1,31 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const group = new mongoose.Schema(
5
- {
6
- groupName: {
7
- type: String,
8
- },
9
- storeList: {
10
- type:Array
11
- },
12
- clientId:{
13
- type: String
14
- },
15
- description: {
16
- type: String
17
- },
18
- isActive: {
19
- type: Boolean,
20
- default: true
21
- }
22
- },
23
- {
24
- strict: true,
25
- versionKey: false,
26
- timestamps: true,
27
- },
28
- );
29
-
30
- group.plugin( mongooseUniqueValidator );
31
- export default mongoose.model( 'group', group);
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const group = new mongoose.Schema(
5
+ {
6
+ groupName: {
7
+ type: String,
8
+ },
9
+ storeList: {
10
+ type:Array
11
+ },
12
+ clientId:{
13
+ type: String
14
+ },
15
+ description: {
16
+ type: String
17
+ },
18
+ isActive: {
19
+ type: Boolean,
20
+ default: true
21
+ }
22
+ },
23
+ {
24
+ strict: true,
25
+ versionKey: false,
26
+ timestamps: true,
27
+ },
28
+ );
29
+
30
+ group.plugin( mongooseUniqueValidator );
31
+ export default mongoose.model( 'group', group);
@@ -1,45 +1,45 @@
1
- import mongoose from 'mongoose';
2
-
3
- const infraReasons = new mongoose.Schema(
4
- {
5
- name: {
6
- type: String,
7
- },
8
- parentId: {
9
- type: mongoose.Types.ObjectId
10
- },
11
- parentName: {
12
- type: String
13
- },
14
- order: {
15
- type: Number
16
- },
17
- toolTips: [
18
- {
19
- name: {
20
- type: String
21
- },
22
- order: {
23
- type: Number
24
- },
25
- }
26
- ],
27
- stepstoResolve: [{
28
- name: {
29
- type: String
30
- },
31
- order: {
32
- type: Number
33
- },
34
- }
35
- ],
36
- },
37
- {
38
- strict: true,
39
- versionKey: false,
40
- timestamps: true,
41
- },
42
- );
43
-
44
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const infraReasons = new mongoose.Schema(
4
+ {
5
+ name: {
6
+ type: String,
7
+ },
8
+ parentId: {
9
+ type: mongoose.Types.ObjectId
10
+ },
11
+ parentName: {
12
+ type: String
13
+ },
14
+ order: {
15
+ type: Number
16
+ },
17
+ toolTips: [
18
+ {
19
+ name: {
20
+ type: String
21
+ },
22
+ order: {
23
+ type: Number
24
+ },
25
+ }
26
+ ],
27
+ stepstoResolve: [{
28
+ name: {
29
+ type: String
30
+ },
31
+ order: {
32
+ type: Number
33
+ },
34
+ }
35
+ ],
36
+ },
37
+ {
38
+ strict: true,
39
+ versionKey: false,
40
+ timestamps: true,
41
+ },
42
+ );
43
+
44
+
45
45
  export default mongoose.model('infraReasons', infraReasons, 'infraReasons');