tango-api-schema 2.0.25 → 2.0.28

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,111 +1,111 @@
1
- import mongoose from 'mongoose';
2
-
3
- const tangoTickets = new mongoose.Schema(
4
- {
5
- ticketId: {
6
- type: String,
7
- },
8
- issueDate: {
9
- type: Date
10
- },
11
- issueClosedDate: {
12
- type: Date
13
- },
14
- issueType: {
15
- type: String,
16
- enum: ['infra', 'highcount', 'lowcount', 'installation']
17
- },
18
- infraTicketDetails: {
19
- addressingClient: {
20
- type: mongoose.Types.ObjectId
21
- },
22
- addressingUser: {
23
- type: mongoose.Types.ObjectId
24
- },
25
- assigntoUser: {
26
- type: Boolean,
27
- default: false,
28
- },
29
- filesCount: {
30
- type: Number
31
- },
32
- issueStatus: {
33
- type: String,
34
- default: 'notidentified',
35
- enum: ['identified', 'notidentified']
36
- },
37
- ticketRefreshTime: {
38
- type: Date
39
- },
40
- ticketType: {
41
- type: String,
42
- enum: ['firsttimeticket', 'refreshticket'],
43
- default: 'firsttimeticket'
44
- }
45
- },
46
- infraActivity: [
47
- {
48
- actionType: {
49
- type: String
50
- },
51
- timeStamp: {
52
- type: Date,
53
- default: new Date()
54
- },
55
- actionBy: {
56
- type: String
57
- },
58
- actionId: {
59
- type: mongoose.Types.ObjectId
60
- },
61
- comment: {
62
- type: {
63
- String
64
- }
65
- },
66
- reasons:[
67
- {
68
- primaryIssue: {
69
- type: String
70
- },
71
- secondaryIssue: [
72
- {
73
- name: {
74
- type: String
75
- }
76
- }
77
- ]
78
- }]
79
- }
80
- ],
81
- basicDetails: {
82
- storeId: {
83
- type: String
84
- },
85
- storeName: {
86
- type: String,
87
- },
88
- clientId: {
89
- type: String,
90
- trim: true,
91
- },
92
- clientName: {
93
- type: String,
94
- trim: true,
95
- },
96
- },
97
- status: {
98
- type: String,
99
- enum: ['open', 'inprogress', 'close'],
100
- default: 'open',
101
- },
102
- },
103
- {
104
- strict: true,
105
- versionKey: false,
106
- timestamps: true,
107
- },
108
- );
109
-
110
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const tangoTickets = new mongoose.Schema(
4
+ {
5
+ ticketId: {
6
+ type: String,
7
+ },
8
+ issueDate: {
9
+ type: Date
10
+ },
11
+ issueClosedDate: {
12
+ type: Date
13
+ },
14
+ issueType: {
15
+ type: String,
16
+ enum: ['infra', 'highcount', 'lowcount', 'installation']
17
+ },
18
+ infraTicketDetails: {
19
+ addressingClient: {
20
+ type: mongoose.Types.ObjectId
21
+ },
22
+ addressingUser: {
23
+ type: mongoose.Types.ObjectId
24
+ },
25
+ assigntoUser: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ filesCount: {
30
+ type: Number
31
+ },
32
+ issueStatus: {
33
+ type: String,
34
+ default: 'notidentified',
35
+ enum: ['identified', 'notidentified']
36
+ },
37
+ ticketRefreshTime: {
38
+ type: Date
39
+ },
40
+ ticketType: {
41
+ type: String,
42
+ enum: ['firsttimeticket', 'refreshticket'],
43
+ default: 'firsttimeticket'
44
+ }
45
+ },
46
+ infraActivity: [
47
+ {
48
+ actionType: {
49
+ type: String
50
+ },
51
+ timeStamp: {
52
+ type: Date,
53
+ default: new Date()
54
+ },
55
+ actionBy: {
56
+ type: String
57
+ },
58
+ actionId: {
59
+ type: mongoose.Types.ObjectId
60
+ },
61
+ comment: {
62
+ type: {
63
+ String
64
+ }
65
+ },
66
+ reasons:[
67
+ {
68
+ primaryIssue: {
69
+ type: String
70
+ },
71
+ secondaryIssue: [
72
+ {
73
+ name: {
74
+ type: String
75
+ }
76
+ }
77
+ ]
78
+ }]
79
+ }
80
+ ],
81
+ basicDetails: {
82
+ storeId: {
83
+ type: String
84
+ },
85
+ storeName: {
86
+ type: String,
87
+ },
88
+ clientId: {
89
+ type: String,
90
+ trim: true,
91
+ },
92
+ clientName: {
93
+ type: String,
94
+ trim: true,
95
+ },
96
+ },
97
+ status: {
98
+ type: String,
99
+ enum: ['open', 'inprogress', 'close'],
100
+ default: 'open',
101
+ },
102
+ },
103
+ {
104
+ strict: true,
105
+ versionKey: false,
106
+ timestamps: true,
107
+ },
108
+ );
109
+
110
+
111
111
  export default mongoose.model('tangoTicket', tangoTickets, 'tangoTicket');
@@ -1,62 +1,62 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const user = new mongoose.Schema(
5
- {
6
- userName: {
7
- type: String,
8
- },
9
- email: {
10
- type: String,
11
- required: true,
12
- unique: true,
13
- },
14
- countryCode: {
15
- type: String,
16
- },
17
- mobileNumber: {
18
- type: String,
19
- required: true,
20
- },
21
- clientId: {
22
- type: String,
23
- },
24
- role: {
25
- type: String,
26
- enum: [ 'superadmin', 'admin', 'user' ],
27
- default: 'user',
28
- },
29
- isActive: {
30
- type: Boolean,
31
- default: true,
32
- },
33
- // Assigned: {
34
- // type: {
35
- // type: String,
36
- // enum: [ 'store', 'group' ],
37
- // },
38
- // list: {
39
- // type: Array,
40
- // },
41
- // },
42
- userType:{
43
- type: String,
44
- enum:['tango','client']
45
- },
46
- password: {
47
- typ: String
48
- },
49
- refreshToken:{
50
- type: String
51
- }
52
-
53
- },
54
- {
55
- strict: true,
56
- versionKey: false,
57
- timestamps: true,
58
- },
59
- );
60
-
61
- user.plugin( mongooseUniqueValidator );
62
- export default mongoose.model( 'user', user );
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const user = new mongoose.Schema(
5
+ {
6
+ userName: {
7
+ type: String,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ countryCode: {
15
+ type: String,
16
+ },
17
+ mobileNumber: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ clientId: {
22
+ type: String,
23
+ },
24
+ role: {
25
+ type: String,
26
+ enum: [ 'superadmin', 'admin', 'user' ],
27
+ default: 'user',
28
+ },
29
+ isActive: {
30
+ type: Boolean,
31
+ default: true,
32
+ },
33
+ // Assigned: {
34
+ // type: {
35
+ // type: String,
36
+ // enum: [ 'store', 'group' ],
37
+ // },
38
+ // list: {
39
+ // type: Array,
40
+ // },
41
+ // },
42
+ userType:{
43
+ type: String,
44
+ enum:['tango','client']
45
+ },
46
+ password: {
47
+ typ: String
48
+ },
49
+ refreshToken:{
50
+ type: String
51
+ }
52
+
53
+ },
54
+ {
55
+ strict: true,
56
+ versionKey: false,
57
+ timestamps: true,
58
+ },
59
+ );
60
+
61
+ user.plugin( mongooseUniqueValidator );
62
+ export default mongoose.model( 'user', user );
@@ -1,37 +1,37 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const userAssigned = new mongoose.Schema(
5
- {
6
- userEmail: {
7
- type: String,
8
- required: true,
9
- unique: true,
10
- },
11
- clientId:{
12
- type: String
13
- },
14
- Assigned: {
15
- type: {
16
- type: String,
17
- enum: [ 'store', 'group' , 'client'],
18
- },
19
- list: {
20
- type: Array,
21
- },
22
- },
23
- userType:{
24
- type: String,
25
- enum:['tango','client']
26
- },
27
-
28
- },
29
- {
30
- strict: true,
31
- versionKey: false,
32
- timestamps: true,
33
- },
34
- );
35
-
36
- userAssigned.plugin( mongooseUniqueValidator );
37
- export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const userAssigned = new mongoose.Schema(
5
+ {
6
+ userEmail: {
7
+ type: String,
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ clientId:{
12
+ type: String
13
+ },
14
+ Assigned: {
15
+ type: {
16
+ type: String,
17
+ enum: [ 'store', 'group' , 'client'],
18
+ },
19
+ list: {
20
+ type: Array,
21
+ },
22
+ },
23
+ userType:{
24
+ type: String,
25
+ enum:['tango','client']
26
+ },
27
+
28
+ },
29
+ {
30
+ strict: true,
31
+ versionKey: false,
32
+ timestamps: true,
33
+ },
34
+ );
35
+
36
+ userAssigned.plugin( mongooseUniqueValidator );
37
+ export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');
@@ -1,71 +1,71 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const userPermission = new mongoose.Schema(
5
- {
6
- userName: {
7
- type: String,
8
- },
9
- email: {
10
- type: String,
11
- required: true,
12
- unique: true,
13
- },
14
- clientId:{
15
- type: String
16
- },
17
- role: {
18
- type: String,
19
- enum: [ 'superadmin', 'admin', 'user' ],
20
- default: 'user',
21
- },
22
- // Assigned: {
23
- // type: {
24
- // type: String,
25
- // enum: [ 'store', 'group' ],
26
- // },
27
- // list: {
28
- // type: Array,
29
- // },
30
- // },
31
- userType:{
32
- type: String,
33
- enum:['tango','client']
34
- },
35
- permission: [
36
- {
37
- featureName: {
38
- type: String,
39
- },
40
- product: [
41
- {
42
- name: {
43
- type: String,
44
- },
45
- isView: {
46
- type: Boolean,
47
- },
48
- isEdit: {
49
- type: Boolean,
50
- },
51
- isDownload: {
52
- type: Boolean,
53
- },
54
- isDelete: {
55
- type: Boolean,
56
- },
57
- },
58
- ],
59
- },
60
- ],
61
-
62
- },
63
- {
64
- strict: true,
65
- versionKey: false,
66
- timestamps: true,
67
- },
68
- );
69
-
70
- userPermission.plugin( mongooseUniqueValidator );
71
- export default mongoose.model( 'userPermission', userPermission ,'userPermission');
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const userPermission = new mongoose.Schema(
5
+ {
6
+ userName: {
7
+ type: String,
8
+ },
9
+ email: {
10
+ type: String,
11
+ required: true,
12
+ unique: true,
13
+ },
14
+ clientId:{
15
+ type: String
16
+ },
17
+ role: {
18
+ type: String,
19
+ enum: [ 'superadmin', 'admin', 'user' ],
20
+ default: 'user',
21
+ },
22
+ // Assigned: {
23
+ // type: {
24
+ // type: String,
25
+ // enum: [ 'store', 'group' ],
26
+ // },
27
+ // list: {
28
+ // type: Array,
29
+ // },
30
+ // },
31
+ userType:{
32
+ type: String,
33
+ enum:['tango','client']
34
+ },
35
+ permission: [
36
+ {
37
+ featureName: {
38
+ type: String,
39
+ },
40
+ product: [
41
+ {
42
+ name: {
43
+ type: String,
44
+ },
45
+ isView: {
46
+ type: Boolean,
47
+ },
48
+ isEdit: {
49
+ type: Boolean,
50
+ },
51
+ isDownload: {
52
+ type: Boolean,
53
+ },
54
+ isDelete: {
55
+ type: Boolean,
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ ],
61
+
62
+ },
63
+ {
64
+ strict: true,
65
+ versionKey: false,
66
+ timestamps: true,
67
+ },
68
+ );
69
+
70
+ userPermission.plugin( mongooseUniqueValidator );
71
+ export default mongoose.model( 'userPermission', userPermission ,'userPermission');
@@ -1,34 +1,34 @@
1
- import mongoose, { Mongoose } from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const vitualSchema = new mongoose.Schema({
5
- paymentType: {
6
- type:String,
7
- required:true
8
- },
9
- accNo:{
10
- type:String,
11
- required:true
12
- },
13
- IFSCCode:{
14
- type: String,
15
- required: true
16
- },
17
- swiftCode:{
18
- type: String,
19
- required: true
20
- },
21
- branch:{
22
- type: String,
23
- required: true
24
- }
25
- }, {
26
- strict: true,
27
- versionKey: false,
28
- timestamps: true,
29
- },)
30
- vitualSchema.plugin(mongooseUniqueValidator);
31
-
32
- const vitualModel = mongoose.model('virtualAccount',vitualSchema);
33
-
1
+ import mongoose, { Mongoose } from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const vitualSchema = new mongoose.Schema({
5
+ paymentType: {
6
+ type:String,
7
+ required:true
8
+ },
9
+ accNo:{
10
+ type:String,
11
+ required:true
12
+ },
13
+ IFSCCode:{
14
+ type: String,
15
+ required: true
16
+ },
17
+ swiftCode:{
18
+ type: String,
19
+ required: true
20
+ },
21
+ branch:{
22
+ type: String,
23
+ required: true
24
+ }
25
+ }, {
26
+ strict: true,
27
+ versionKey: false,
28
+ timestamps: true,
29
+ },)
30
+ vitualSchema.plugin(mongooseUniqueValidator);
31
+
32
+ const vitualModel = mongoose.model('virtualAccount',vitualSchema);
33
+
34
34
  export default vitualModel;