tango-api-schema 2.6.5 → 2.6.7
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/package.json
CHANGED
|
@@ -122,7 +122,7 @@ const checklistconfigSchema = new mongoose.Schema({
|
|
|
122
122
|
checkListType: {
|
|
123
123
|
type: String,
|
|
124
124
|
default: "custom",
|
|
125
|
-
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom", "customerunattended", "staffleftinthemiddle", 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'unauthorisedentry', 'backroommonitoring', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'staffgrouping','employeeCount']
|
|
125
|
+
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom", "customerunattended", "staffleftinthemiddle", 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'unauthorisedentry', 'backroommonitoring', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'staffgrouping','employeeCount','unattendeddetection']
|
|
126
126
|
},
|
|
127
127
|
createdAt: {
|
|
128
128
|
type: Date,
|
package/schema/invoice.model.js
CHANGED
|
@@ -95,8 +95,28 @@ const invoiceSchema = new mongoose.Schema(
|
|
|
95
95
|
paymentStatus:{
|
|
96
96
|
type:String,
|
|
97
97
|
default:'unpaid',
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// 'partial' = paidAmount > 0 && paidAmount < totalAmount.
|
|
99
|
+
// Server derives this in recordPayment so the value stays in sync.
|
|
100
|
+
enum: ['paid','unpaid','partial']
|
|
101
|
+
},
|
|
102
|
+
// Running total of all payments recorded against this invoice. Sum of
|
|
103
|
+
// paymentHistory[].amount; persisted for easy querying / display so
|
|
104
|
+
// the frontend doesn't need to re-sum every render.
|
|
105
|
+
paidAmount:{
|
|
106
|
+
type:Number,
|
|
107
|
+
default:0
|
|
108
|
+
},
|
|
109
|
+
// Append-only audit trail. Each entry is one payment received from
|
|
110
|
+
// the client. recordedAt is server-set; the rest comes from the form.
|
|
111
|
+
paymentHistory:[{
|
|
112
|
+
amount:{type:Number, required:true},
|
|
113
|
+
date:{type:Date, required:true},
|
|
114
|
+
method:{type:String, enum:['banktransfer','upi','cheque','card','cash','other']},
|
|
115
|
+
reference:{type:String},
|
|
116
|
+
notes:{type:String},
|
|
117
|
+
recordedBy:{type:String},
|
|
118
|
+
recordedAt:{type:Date, default:Date.now}
|
|
119
|
+
}],
|
|
100
120
|
advanceInvoice:{
|
|
101
121
|
type:Boolean,
|
|
102
122
|
default:false
|
|
@@ -81,7 +81,7 @@ const processedchecklistconfigSchema = new mongoose.Schema({
|
|
|
81
81
|
checkListType: {
|
|
82
82
|
type: String,
|
|
83
83
|
default: "custom",
|
|
84
|
-
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom", "customerunattended", "staffleftinthemiddle", 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'unauthorisedentry', 'backroommonitoring', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance','cameratampering','staffgrouping','employeeCount']
|
|
84
|
+
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom", "customerunattended", "staffleftinthemiddle", 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'queuealert', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'unauthorisedentry', 'backroommonitoring', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance','cameratampering','staffgrouping','employeeCount','unattendeddetection']
|
|
85
85
|
},
|
|
86
86
|
startTime: {
|
|
87
87
|
type: Date
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
const recurringFlagTrackerSchema = new mongoose.Schema({
|
|
4
|
-
client_id: {
|
|
5
|
-
type: String,
|
|
6
|
-
required: true,
|
|
7
|
-
},
|
|
8
|
-
sourceCheckList_id: {
|
|
9
|
-
type: mongoose.SchemaTypes.ObjectId,
|
|
10
|
-
ref: 'checklistconfig',
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
checkListName: {
|
|
14
|
-
type: String,
|
|
15
|
-
},
|
|
16
|
-
coverage: {
|
|
17
|
-
type: String,
|
|
18
|
-
enum: ['store', 'user'],
|
|
19
|
-
default: 'store',
|
|
20
|
-
},
|
|
21
|
-
store_id: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '',
|
|
24
|
-
},
|
|
25
|
-
storeName: {
|
|
26
|
-
type: String,
|
|
27
|
-
},
|
|
28
|
-
user_id: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: '',
|
|
31
|
-
},
|
|
32
|
-
userName: {
|
|
33
|
-
type: String,
|
|
34
|
-
},
|
|
35
|
-
userEmail: {
|
|
36
|
-
type: String,
|
|
37
|
-
},
|
|
38
|
-
section_id: {
|
|
39
|
-
type: String,
|
|
40
|
-
},
|
|
41
|
-
sectionName: {
|
|
42
|
-
type: String,
|
|
43
|
-
},
|
|
44
|
-
qno: {
|
|
45
|
-
type: String,
|
|
46
|
-
},
|
|
47
|
-
qname: {
|
|
48
|
-
type: String,
|
|
49
|
-
},
|
|
50
|
-
consecutiveCount: {
|
|
51
|
-
type: Number,
|
|
52
|
-
default: 0,
|
|
53
|
-
},
|
|
54
|
-
lastFlaggedDate: {
|
|
55
|
-
type: String,
|
|
56
|
-
},
|
|
57
|
-
lastEmailDate: {
|
|
58
|
-
type: String,
|
|
59
|
-
},
|
|
60
|
-
runAICount: {
|
|
61
|
-
type: Number,
|
|
62
|
-
default: 0,
|
|
63
|
-
},
|
|
64
|
-
lastRunAIFlaggedDate: {
|
|
65
|
-
type: String,
|
|
66
|
-
},
|
|
67
|
-
emailHistory: {
|
|
68
|
-
type: [ String ],
|
|
69
|
-
default: [],
|
|
70
|
-
},
|
|
71
|
-
lastSubmittedBy: {
|
|
72
|
-
type: String,
|
|
73
|
-
},
|
|
74
|
-
lastSubmissionDate: {
|
|
75
|
-
type: String,
|
|
76
|
-
},
|
|
77
|
-
}, {
|
|
78
|
-
strict: true,
|
|
79
|
-
versionKey: false,
|
|
80
|
-
timestamps: true,
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
recurringFlagTrackerSchema.index({
|
|
84
|
-
client_id: 1,
|
|
85
|
-
sourceCheckList_id: 1,
|
|
86
|
-
store_id: 1,
|
|
87
|
-
user_id: 1,
|
|
88
|
-
section_id: 1,
|
|
89
|
-
qno: 1,
|
|
90
|
-
}, { unique: true });
|
|
91
|
-
|
|
92
|
-
export default mongoose.model('recurringFlagTracker', recurringFlagTrackerSchema);
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const recurringFlagTrackerSchema = new mongoose.Schema({
|
|
4
|
+
client_id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
sourceCheckList_id: {
|
|
9
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
10
|
+
ref: 'checklistconfig',
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
checkListName: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
coverage: {
|
|
17
|
+
type: String,
|
|
18
|
+
enum: ['store', 'user'],
|
|
19
|
+
default: 'store',
|
|
20
|
+
},
|
|
21
|
+
store_id: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
storeName: {
|
|
26
|
+
type: String,
|
|
27
|
+
},
|
|
28
|
+
user_id: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
userName: {
|
|
33
|
+
type: String,
|
|
34
|
+
},
|
|
35
|
+
userEmail: {
|
|
36
|
+
type: String,
|
|
37
|
+
},
|
|
38
|
+
section_id: {
|
|
39
|
+
type: String,
|
|
40
|
+
},
|
|
41
|
+
sectionName: {
|
|
42
|
+
type: String,
|
|
43
|
+
},
|
|
44
|
+
qno: {
|
|
45
|
+
type: String,
|
|
46
|
+
},
|
|
47
|
+
qname: {
|
|
48
|
+
type: String,
|
|
49
|
+
},
|
|
50
|
+
consecutiveCount: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 0,
|
|
53
|
+
},
|
|
54
|
+
lastFlaggedDate: {
|
|
55
|
+
type: String,
|
|
56
|
+
},
|
|
57
|
+
lastEmailDate: {
|
|
58
|
+
type: String,
|
|
59
|
+
},
|
|
60
|
+
runAICount: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0,
|
|
63
|
+
},
|
|
64
|
+
lastRunAIFlaggedDate: {
|
|
65
|
+
type: String,
|
|
66
|
+
},
|
|
67
|
+
emailHistory: {
|
|
68
|
+
type: [ String ],
|
|
69
|
+
default: [],
|
|
70
|
+
},
|
|
71
|
+
lastSubmittedBy: {
|
|
72
|
+
type: String,
|
|
73
|
+
},
|
|
74
|
+
lastSubmissionDate: {
|
|
75
|
+
type: String,
|
|
76
|
+
},
|
|
77
|
+
}, {
|
|
78
|
+
strict: true,
|
|
79
|
+
versionKey: false,
|
|
80
|
+
timestamps: true,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
recurringFlagTrackerSchema.index({
|
|
84
|
+
client_id: 1,
|
|
85
|
+
sourceCheckList_id: 1,
|
|
86
|
+
store_id: 1,
|
|
87
|
+
user_id: 1,
|
|
88
|
+
section_id: 1,
|
|
89
|
+
qno: 1,
|
|
90
|
+
}, { unique: true });
|
|
91
|
+
|
|
92
|
+
export default mongoose.model('recurringFlagTracker', recurringFlagTrackerSchema);
|