vhp-mongo-models 1.6.2 → 2.0.0
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.
|
@@ -15,7 +15,7 @@ const { aaddress, acontact } = require('../../core-models.js');
|
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
let pvmaint =
|
|
18
|
+
let pvmaint = {
|
|
19
19
|
contractNum:{type:String,default:''},
|
|
20
20
|
rewardNum:{type:String,default:''},
|
|
21
21
|
jobref:{type:String,default:''},
|
|
@@ -26,9 +26,8 @@ let pvmaint = new Schema({
|
|
|
26
26
|
state:{type:String,default:''},
|
|
27
27
|
zip:{type:String,default:''},
|
|
28
28
|
visits:{type:Array,default:[]}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let lead = new Schema({
|
|
29
|
+
}
|
|
30
|
+
let lead = {
|
|
32
31
|
apptdate:{type:Date,default:''},
|
|
33
32
|
type:{type:String,default:''},
|
|
34
33
|
prstdate:{type:Date,default:''},
|
|
@@ -40,15 +39,15 @@ let lead = new Schema({
|
|
|
40
39
|
generator:{type:String,default:''},
|
|
41
40
|
soldAmount:{type:Number,default:0},
|
|
42
41
|
paid:{type:Date,default:''}
|
|
43
|
-
}
|
|
44
|
-
let info =
|
|
42
|
+
}
|
|
43
|
+
let info = {
|
|
45
44
|
pkids:{type:Array,default:[]},
|
|
46
45
|
spaces:{type:Object,default:[]},
|
|
47
46
|
summary:{type:Object,default:{}},
|
|
48
47
|
quotes:{type:Object,default:{}},
|
|
49
48
|
joblog:{type:Object,default:{}},
|
|
50
49
|
pvmaint:pvmaint,
|
|
51
|
-
}
|
|
50
|
+
}
|
|
52
51
|
/** Projects Schema
|
|
53
52
|
*
|
|
54
53
|
* index
|
|
@@ -83,7 +82,8 @@ module.exports=[
|
|
|
83
82
|
},
|
|
84
83
|
{
|
|
85
84
|
toJSON: { virtuals: true },
|
|
86
|
-
toObject: { virtuals: true }
|
|
85
|
+
toObject: { virtuals: true },
|
|
86
|
+
minimize:false
|
|
87
87
|
}
|
|
88
88
|
]
|
|
89
89
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const { Schema } = require('mongoose')
|
|
2
2
|
|
|
3
|
-
let ticketInvoice =
|
|
3
|
+
let ticketInvoice = {
|
|
4
4
|
total:{type:Number,default:0},
|
|
5
5
|
pricelevel:{type:String,default:''}
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
let repairEstimate =
|
|
8
|
+
let repairEstimate = {
|
|
9
9
|
time:{type:Number,default:0}, //time to complete all repairs
|
|
10
10
|
revenuePerEstimate:{type:Number,default:0},
|
|
11
11
|
revenuePer:{type:Number,default:0}
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
|
|
14
|
-
let ticketFinal =
|
|
14
|
+
let ticketFinal = {
|
|
15
15
|
showReplacement:{type:Boolean,default:false},
|
|
16
16
|
summary:{type:Object,default:{}}, //a static version of the presentation
|
|
17
17
|
conform:{type:Object,default:{}},
|
|
@@ -27,7 +27,7 @@ let ticketFinal = new Schema({
|
|
|
27
27
|
timelog:{type:Object,default:{}},
|
|
28
28
|
officeSubmit:{type:String,default:''},
|
|
29
29
|
completedBy:{type:Array,default:[]} //change to string, lcoaland tag with the lead who completed
|
|
30
|
-
}
|
|
30
|
+
}
|
|
31
31
|
|
|
32
32
|
module.exports = ticketFinal
|
|
33
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { Schema } = require('mongoose')
|
|
2
|
-
module.exports =
|
|
2
|
+
module.exports = {
|
|
3
3
|
id:{type:String,default:''},
|
|
4
4
|
custcode:{type:String,default:''},
|
|
5
5
|
contactname:{type:String,default:''},
|
|
@@ -35,4 +35,4 @@ module.exports = new Schema({
|
|
|
35
35
|
timecomplete:{type:String,default:''},
|
|
36
36
|
datecompletesched:{type:Date,default:''},
|
|
37
37
|
timecompletesched:{type:String,default:''}
|
|
38
|
-
}
|
|
38
|
+
}
|
|
@@ -40,11 +40,9 @@ module.exports = {
|
|
|
40
40
|
techinfo: {type:Object, default:{}}, //hold all info on techs involved
|
|
41
41
|
salesrep:{type:String,default:''},
|
|
42
42
|
|
|
43
|
-
|
|
44
43
|
hhid:{type:String,default:''},
|
|
45
44
|
...aaddress, //do not need?
|
|
46
45
|
|
|
47
|
-
|
|
48
46
|
checks: { type: Object, default: {} },
|
|
49
47
|
repairs: { type: Object, default: {} },
|
|
50
48
|
sitems: { type: Array, default: [] },
|