tango-api-schema 2.0.1 → 2.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,7 +1,9 @@
1
1
  import leadModel from "./schema/lead.model.js";
2
2
  import otpModel from "./schema/otp.model.js";
3
+ import storeModel from "./schema/store.model.js";
3
4
 
4
5
  export default {
5
6
  leadModel,
6
- otpModel
7
+ otpModel,
8
+ storeModel
7
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,108 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const store = new mongoose.Schema(
5
+ {
6
+ storeId: {
7
+ type: String,
8
+ trim: true,
9
+ required: true,
10
+ unique: true,
11
+ },
12
+ storeName: {
13
+ type: String,
14
+ require: true,
15
+ },
16
+ appId: {
17
+ type: String,
18
+ trim: true,
19
+ required: true,
20
+ unique: true,
21
+ },
22
+ clientId: {
23
+ type: String,
24
+ trim: true,
25
+ required: true,
26
+ },
27
+ businessType: {
28
+ type: String,
29
+ },
30
+ storeType: {
31
+ type: {
32
+ type: String,
33
+ },
34
+ name: {
35
+ type: String,
36
+ },
37
+ },
38
+
39
+ storeProfile: {
40
+ storeCode: {
41
+ type: String,
42
+ },
43
+ address: {
44
+ type: String,
45
+ },
46
+ country: {
47
+ type: String,
48
+ },
49
+ state: {
50
+ type: String,
51
+ },
52
+ city: {
53
+ type: String,
54
+ },
55
+ pincode: {
56
+ type: String,
57
+ },
58
+ timeZone: {
59
+ type: String,
60
+ },
61
+ open: {
62
+ type: String,
63
+ },
64
+ close: {
65
+ type: String,
66
+ },
67
+ },
68
+ edge: {
69
+ camDetails: {
70
+ cameras: {
71
+ type: String,
72
+ },
73
+ },
74
+ },
75
+ spocDetails: [
76
+ {
77
+ name: {
78
+ type: String,
79
+ required: true,
80
+ },
81
+ email: {
82
+ type: String,
83
+ required: true,
84
+ },
85
+ contact: {
86
+ type: String,
87
+ required: true,
88
+ },
89
+ designation: {
90
+ type: String,
91
+ },
92
+ },
93
+ ],
94
+ storeConnectionId: {
95
+ type: String,
96
+ },
97
+ },
98
+ {
99
+ strict: true,
100
+ versionKey: false,
101
+ timestamps: true,
102
+ },
103
+ );
104
+
105
+ store.index( { storeId: 1, clientId: 1, appId: 1 } );
106
+ store.plugin( mongooseUniqueValidator );
107
+
108
+ export default mongoose.model( 'store', store );