vhp-mongo-models 1.5.5 → 1.5.6-DEV
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,10 +1,46 @@
|
|
|
1
1
|
module.exports = [
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
hhid:{type:String,default:''}, //must have a hhid
|
|
4
|
+
id:{type:String,default:''}, //must have an id, should match JONAS
|
|
5
|
+
group:{type:String,default:''},//names the type of product it is. Would like to use this instead of type
|
|
6
|
+
sysid:{type:String,default:''}, //way to link related service items
|
|
7
|
+
space:{type:String,default:''},
|
|
8
|
+
subspace:{type:String,default:''},
|
|
9
|
+
quantity:{type:Number,default:1}, //optional qty
|
|
10
|
+
notes:{type:String,default:''},
|
|
11
|
+
|
|
12
|
+
//JONAS props
|
|
13
|
+
tagid:{type:String,default:''},
|
|
14
|
+
type:{type:String,default:''},//understand what this is in jonas
|
|
15
|
+
desc:{type:String,default:''},
|
|
16
|
+
status:{type:String,default:''},//should be 'A' for active. Need to find other codes. Match JONAS
|
|
17
|
+
insdate:{type:Date,default:''},
|
|
18
|
+
|
|
19
|
+
model:{type:String,default:''},
|
|
20
|
+
serial:{type:String,default:''},
|
|
21
|
+
manf:{type:String,default:''},
|
|
22
|
+
|
|
7
23
|
location:{type:String,default:''},
|
|
8
|
-
|
|
24
|
+
area:{type:String,default:''},
|
|
25
|
+
|
|
26
|
+
controls:{type:String,default:''},
|
|
27
|
+
elec:{type:String,default:''},
|
|
28
|
+
|
|
29
|
+
filt1:{type:String,default:''},
|
|
30
|
+
filt1q:{type:Number,default:0},
|
|
31
|
+
filt2:{type:String,default:''},
|
|
32
|
+
filt2q:{type:Number,default:0},
|
|
33
|
+
filt3:{type:String,default:''},
|
|
34
|
+
filt3q:{type:Number,default:0},
|
|
35
|
+
|
|
36
|
+
warr1:{type:Number,default:0},
|
|
37
|
+
warr2:{type:Number,default:0},
|
|
38
|
+
warr3:{type:Number,default:0},
|
|
39
|
+
|
|
40
|
+
expry1:{type:Date,default:''},
|
|
41
|
+
expry2:{type:Date,default:''},
|
|
42
|
+
expry3:{type:Date,default:''},
|
|
43
|
+
|
|
44
|
+
|
|
9
45
|
}
|
|
10
46
|
]
|
|
@@ -3,12 +3,30 @@ const {aaddress}=require('../../core-models.js');
|
|
|
3
3
|
const wo = require('./subs/jonaswo.js')
|
|
4
4
|
const ticketFinal = require('./subs/final.js')
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
/* TECHINFO *
|
|
8
|
+
[
|
|
9
|
+
<user>:{
|
|
10
|
+
name:{type:String,default:''},
|
|
11
|
+
assigned:{type:Array,default:[{
|
|
12
|
+
id:{type:String,default:''}, //the service item id
|
|
13
|
+
done:{type:Boolean,default:false}
|
|
14
|
+
}]},
|
|
15
|
+
driveTime:{type:Date,default:''},
|
|
16
|
+
startTime:{type:Date,default:''},
|
|
17
|
+
endTime:{type:Date,default:''},
|
|
18
|
+
adjustTime:{type:Number,default:0},
|
|
19
|
+
totalTime:{type:Number,default:0}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
*/
|
|
6
23
|
module.exports = [
|
|
7
24
|
{
|
|
8
25
|
id: { type: String, default: '' },
|
|
9
26
|
ref: { type: Object, default: {} },
|
|
10
27
|
status: { type: String, default: 'active' },
|
|
11
28
|
techs: { type: Array, default: [] },
|
|
29
|
+
techinfo: {type:Object, default:{}}, //hold all info on techs involved
|
|
12
30
|
custid: {type:String, default:''},
|
|
13
31
|
cat:{type:String,default:''},
|
|
14
32
|
dept:{type:String,default:''},
|
|
@@ -25,8 +43,9 @@ module.exports = [
|
|
|
25
43
|
salesrep:{type:String,default:''},
|
|
26
44
|
sitems: { type: Array, default: [] },
|
|
27
45
|
wo: wo,
|
|
28
|
-
todo:{type:Object, default: {}},
|
|
29
|
-
office: { type: Object, default: {} }
|
|
46
|
+
todo:{type:Object, default: {}}, //this should be replaced by office
|
|
47
|
+
office: { type: Object, default: {} },//any todo items for the office
|
|
48
|
+
field: {type:Object,default:{}},//any todo items for the field
|
|
30
49
|
logs:{type:Array,default:[]}
|
|
31
50
|
}
|
|
32
51
|
]
|
|
@@ -4,13 +4,9 @@ let ticketInvoice = new Schema({
|
|
|
4
4
|
total:{type:Number,default:0},
|
|
5
5
|
pricelevel:{type:String,default:''}
|
|
6
6
|
})
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
endTime:{type:Date,default:''},
|
|
11
|
-
adjustTime:{type:Number,default:0},
|
|
12
|
-
totalTime:{type:Number,default:0},
|
|
13
|
-
repairEstimate:{type:Number,default:0},
|
|
7
|
+
|
|
8
|
+
let repairEstimate = new Schema({
|
|
9
|
+
time:{type:Number,default:0}, //time to complete all repairs
|
|
14
10
|
revenuePerEstimate:{type:Number,default:0},
|
|
15
11
|
revenuePer:{type:Number,default:0}
|
|
16
12
|
})
|
|
@@ -21,15 +17,15 @@ let ticketFinal = new Schema({
|
|
|
21
17
|
invoice:ticketInvoice,
|
|
22
18
|
signature:{type:String,default:''},
|
|
23
19
|
emailed:{type:Boolean,default:false},
|
|
24
|
-
officeSubmit:{type:String,default:''},
|
|
25
20
|
paymentMethod:{type:String,default:''},
|
|
26
|
-
returnVisit:{type:
|
|
21
|
+
returnVisit:{type:String,default:''}, //change to String, and attach return ticket id
|
|
27
22
|
returnNotes:{type:String,default:''},
|
|
28
23
|
addlDetails:{type:String,default:''},
|
|
29
24
|
serviceReferral:{type:Boolean,default:false},
|
|
30
|
-
|
|
25
|
+
repairEstimate:repairEstimate, //was ticketTime
|
|
31
26
|
timelog:{type:Object,default:{}},
|
|
32
|
-
|
|
27
|
+
officeSubmit:{type:String,default:''},
|
|
28
|
+
completedBy:{type:Array,default:[]} //change to string, and tag with the lead who completed
|
|
33
29
|
})
|
|
34
30
|
|
|
35
31
|
module.exports = ticketFinal
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const {aaddress}=require('../../../core-models.js');
|
|
2
|
+
const wo = require('./jonaswo.js')
|
|
3
|
+
const ticketFinal = require('./final.js')
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
id: { type: String, default: '' },
|
|
7
|
+
ref: { type: Object, default: {} },
|
|
8
|
+
status: { type: String, default: 'active' },
|
|
9
|
+
techs: { type: Array, default: [] },
|
|
10
|
+
techinfo: {type:Object, default:{}}, //hold all info on techs involved
|
|
11
|
+
custid: {type:String, default:''},
|
|
12
|
+
cat:{type:String,default:''},
|
|
13
|
+
dept:{type:String,default:''},
|
|
14
|
+
hhid:{type:String,default:''},
|
|
15
|
+
...aaddress,
|
|
16
|
+
}
|