tango-api-schema 2.0.91 → 2.0.92

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,66 +1,66 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const invoiceSchema = new mongoose.Schema(
5
- {
6
- clientId: {
7
- type:String
8
- },
9
- invoice: {
10
- type:String,
11
- },
12
- stores: {
13
- type:Number
14
- },
15
- products:{
16
- type:Array
17
- },
18
- amount:{
19
- type:Number
20
- },
21
- totalAmount:{
22
- type:Number
23
- },
24
- revisedAmount:{
25
- type:Number
26
- },
27
- discount:{
28
- type:Number
29
- },
30
- status:{
31
- type:String
32
- },
33
- receivedAmount:{
34
- type:Number
35
- },
36
- billingDate:{
37
- type:Date
38
- },
39
- dueDate:{
40
- type:Date
41
- },
42
- paidDate:{
43
- type:Date
44
- },
45
- paymentType: {
46
- type:String,
47
- enum: ['online','banktransfer']
48
- },
49
- paymentReferenceId: {
50
- type:String
51
- },
52
- fromDate:{
53
- type:Date
54
- },
55
- toDate:{
56
- type:Date
57
- },
58
- },{
59
- strict: true,
60
- versionKey: false,
61
- timestamps: true,
62
- }
63
- )
64
-
65
- invoiceSchema.plugin(mongooseUniqueValidator);
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const invoiceSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type:String
8
+ },
9
+ invoice: {
10
+ type:String,
11
+ },
12
+ stores: {
13
+ type:Number
14
+ },
15
+ products:{
16
+ type:Array
17
+ },
18
+ amount:{
19
+ type:Number
20
+ },
21
+ totalAmount:{
22
+ type:Number
23
+ },
24
+ revisedAmount:{
25
+ type:Number
26
+ },
27
+ discount:{
28
+ type:Number
29
+ },
30
+ status:{
31
+ type:String
32
+ },
33
+ receivedAmount:{
34
+ type:Number
35
+ },
36
+ billingDate:{
37
+ type:Date
38
+ },
39
+ dueDate:{
40
+ type:Date
41
+ },
42
+ paidDate:{
43
+ type:Date
44
+ },
45
+ paymentType: {
46
+ type:String,
47
+ enum: ['online','banktransfer']
48
+ },
49
+ paymentReferenceId: {
50
+ type:String
51
+ },
52
+ fromDate:{
53
+ type:Date
54
+ },
55
+ toDate:{
56
+ type:Date
57
+ },
58
+ },{
59
+ strict: true,
60
+ versionKey: false,
61
+ timestamps: true,
62
+ }
63
+ )
64
+
65
+ invoiceSchema.plugin(mongooseUniqueValidator);
66
66
  export default mongoose.model('invoice', invoiceSchema);
@@ -1,40 +1,40 @@
1
- import mongoose from 'mongoose';
2
- import uniqueValidator from 'mongoose-unique-validator';
3
- const collection = new mongoose.Schema(
4
- {
5
- ipDetails: [
6
- {
7
- ip: {
8
- type: String,
9
- trim: true,
10
- },
11
- manufacturer: {
12
- type: String,
13
- trim: true,
14
- },
15
- macId: {
16
- type: String,
17
- trim: true,
18
- },
19
- },
20
- ],
21
- storeId: {
22
- type: String,
23
- trim: true,
24
- },
25
- clientId: {
26
- type: String,
27
- trim: true,
28
- },
29
- },
30
- {
31
- timestamps: true,
32
- versionKey: false,
33
- strict: true,
34
- },
35
- );
36
- collection.index( { createdAt: 1 }, { expires: '1d' } );
37
- collection.index( { storeId: 1 } );
38
- collection.plugin( uniqueValidator );
39
-
1
+ import mongoose from 'mongoose';
2
+ import uniqueValidator from 'mongoose-unique-validator';
3
+ const collection = new mongoose.Schema(
4
+ {
5
+ ipDetails: [
6
+ {
7
+ ip: {
8
+ type: String,
9
+ trim: true,
10
+ },
11
+ manufacturer: {
12
+ type: String,
13
+ trim: true,
14
+ },
15
+ macId: {
16
+ type: String,
17
+ trim: true,
18
+ },
19
+ },
20
+ ],
21
+ storeId: {
22
+ type: String,
23
+ trim: true,
24
+ },
25
+ clientId: {
26
+ type: String,
27
+ trim: true,
28
+ },
29
+ },
30
+ {
31
+ timestamps: true,
32
+ versionKey: false,
33
+ strict: true,
34
+ },
35
+ );
36
+ collection.index( { createdAt: 1 }, { expires: '1d' } );
37
+ collection.index( { storeId: 1 } );
38
+ collection.plugin( uniqueValidator );
39
+
40
40
  export default mongoose.model( 'ipLog', collection, 'ipLog' );
@@ -1,71 +1,71 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const lead = new mongoose.Schema(
5
- {
6
- clientName: {
7
- type: String,
8
- trim: true,
9
- required: true,
10
- unique: true,
11
- },
12
- firstName: {
13
- type: String,
14
- required: true,
15
- },
16
- lastName: {
17
- type: String,
18
- },
19
- corporateEmail: {
20
- type: String,
21
- required: true,
22
- unique: true,
23
- },
24
- countryCode: {
25
- type: String,
26
- },
27
- mobileNumber: {
28
- type: Number,
29
- required: true,
30
- },
31
- planDetails: {
32
- totalStores: {
33
- type: String,
34
- required: true,
35
- },
36
- storeSize: {
37
- type: String,
38
- required: true,
39
- },
40
- totalCamera: {
41
- type: Number,
42
- required: true,
43
- },
44
- subscriptionPeriod: {
45
- type: String,
46
- enum: [ 'monthly', 'quarterly', 'annual' ],
47
- },
48
- subscriptionType: {
49
- type: String,
50
- enum: [ 'free', 'premium', 'enterprise' ],
51
- },
52
- product: {
53
- type: Array,
54
- },
55
-
56
- },
57
- status: {
58
- type: String,
59
- enum: [ 'pending', 'rejected', 'approved' ],
60
- default: 'pending',
61
- },
62
- },
63
- {
64
- strict: true,
65
- versionKey: false,
66
- timestamps: true,
67
- },
68
- );
69
-
70
- lead.plugin( mongooseUniqueValidator );
71
- export default mongoose.model( 'lead', lead );
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const lead = new mongoose.Schema(
5
+ {
6
+ clientName: {
7
+ type: String,
8
+ trim: true,
9
+ required: true,
10
+ unique: true,
11
+ },
12
+ firstName: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ lastName: {
17
+ type: String,
18
+ },
19
+ corporateEmail: {
20
+ type: String,
21
+ required: true,
22
+ unique: true,
23
+ },
24
+ countryCode: {
25
+ type: String,
26
+ },
27
+ mobileNumber: {
28
+ type: Number,
29
+ required: true,
30
+ },
31
+ planDetails: {
32
+ totalStores: {
33
+ type: String,
34
+ required: true,
35
+ },
36
+ storeSize: {
37
+ type: String,
38
+ required: true,
39
+ },
40
+ totalCamera: {
41
+ type: Number,
42
+ required: true,
43
+ },
44
+ subscriptionPeriod: {
45
+ type: String,
46
+ enum: [ 'monthly', 'quarterly', 'annual' ],
47
+ },
48
+ subscriptionType: {
49
+ type: String,
50
+ enum: [ 'free', 'premium', 'enterprise' ],
51
+ },
52
+ product: {
53
+ type: Array,
54
+ },
55
+
56
+ },
57
+ status: {
58
+ type: String,
59
+ enum: [ 'pending', 'rejected', 'approved' ],
60
+ default: 'pending',
61
+ },
62
+ },
63
+ {
64
+ strict: true,
65
+ versionKey: false,
66
+ timestamps: true,
67
+ },
68
+ );
69
+
70
+ lead.plugin( mongooseUniqueValidator );
71
+ export default mongoose.model( 'lead', lead );
@@ -1,29 +1,29 @@
1
- import uniqueValidator from 'mongoose-unique-validator';
2
- import mongoose from 'mongoose';
3
-
4
- // schema
5
- const collection = new mongoose.Schema( {
6
- email: {
7
- type: String,
8
- trim: true,
9
- unique: true,
10
- },
11
- otp: {
12
- type: Number,
13
- },
14
- type: {
15
- type: String,
16
- enum: [ 'signup' , 'changepassword'],
17
- },
18
- },
19
- {
20
- timestamps: true,
21
- strict: true,
22
- versionKey: false,
23
- } );
24
-
25
- collection.plugin( uniqueValidator );
26
- collection.index( { createdAt: 1 }, { expires: '1d' } );
27
- collection.index( { type: 1, email: 1 } );
28
-
1
+ import uniqueValidator from 'mongoose-unique-validator';
2
+ import mongoose from 'mongoose';
3
+
4
+ // schema
5
+ const collection = new mongoose.Schema( {
6
+ email: {
7
+ type: String,
8
+ trim: true,
9
+ unique: true,
10
+ },
11
+ otp: {
12
+ type: Number,
13
+ },
14
+ type: {
15
+ type: String,
16
+ enum: [ 'signup' , 'changepassword'],
17
+ },
18
+ },
19
+ {
20
+ timestamps: true,
21
+ strict: true,
22
+ versionKey: false,
23
+ } );
24
+
25
+ collection.plugin( uniqueValidator );
26
+ collection.index( { createdAt: 1 }, { expires: '1d' } );
27
+ collection.index( { type: 1, email: 1 } );
28
+
29
29
  export default mongoose.model( 'otp', collection );
@@ -1,57 +1,57 @@
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
- orderId: {
23
- type: String,
24
- },
25
- userId: {
26
- type: String,
27
- },
28
- productId : {
29
- type: String,
30
- },
31
- QCHold : {
32
- type: Boolean,
33
- default:false
34
- },
35
- timestamp:{
36
- type: String,
37
- },
38
- userEmail:{
39
- type: String,
40
- },
41
- fittingId:{
42
- type: String,
43
- },
44
- status:{
45
- type: Boolean,
46
- }
47
- }, {
48
- timestamps: true,
49
- strict: true,
50
- versionKey: false,
51
- } );
52
-
53
- collection.index({ createdAt: 1 })
54
- collection.index({ fittingId: 1 })
55
- collection.index({ userId: 1 })
56
-
57
- export default model( 'qualityCheck', collection );
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
+ orderId: {
23
+ type: String,
24
+ },
25
+ userId: {
26
+ type: String,
27
+ },
28
+ productId : {
29
+ type: String,
30
+ },
31
+ QCHold : {
32
+ type: Boolean,
33
+ default:false
34
+ },
35
+ timestamp:{
36
+ type: String,
37
+ },
38
+ userEmail:{
39
+ type: String,
40
+ },
41
+ fittingId:{
42
+ type: String,
43
+ },
44
+ status:{
45
+ type: Boolean,
46
+ }
47
+ }, {
48
+ timestamps: true,
49
+ strict: true,
50
+ versionKey: false,
51
+ } );
52
+
53
+ collection.index({ createdAt: 1 })
54
+ collection.index({ fittingId: 1 })
55
+ collection.index({ userId: 1 })
56
+
57
+ export default model( 'qualityCheck', collection );
@@ -1,30 +1,30 @@
1
- import { Schema, model } from 'mongoose';
2
-
3
-
4
- const reportschema = new Schema( {
5
- fileName: {
6
- type: String,
7
- required: true,
8
- },
9
- fileType: {
10
- type: String,
11
- required: true,
12
- },
13
- reportName: {
14
- type: String,
15
- },
16
- email: {
17
- type: Array,
18
- required: true,
19
- },
20
- clientId: {
21
- type: String,
22
- }
23
- },
24
- {
25
- strict: true,
26
- versionKey: false,
27
- timestamps: true,
28
- } );
29
-
30
- export default model( 'report', reportschema );
1
+ import { Schema, model } from 'mongoose';
2
+
3
+
4
+ const reportschema = new Schema( {
5
+ fileName: {
6
+ type: String,
7
+ required: true,
8
+ },
9
+ fileType: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ reportName: {
14
+ type: String,
15
+ },
16
+ email: {
17
+ type: Array,
18
+ required: true,
19
+ },
20
+ clientId: {
21
+ type: String,
22
+ }
23
+ },
24
+ {
25
+ strict: true,
26
+ versionKey: false,
27
+ timestamps: true,
28
+ } );
29
+
30
+ export default model( 'report', reportschema );