vhp-mongo-models 1.2.4 → 1.2.5
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,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
const {aaddress}=require('../../core-models.js');
|
|
3
|
-
|
|
3
|
+
const wo = require('./subs/jonaswo.js')
|
|
4
|
+
const ticketFinal = require('./subs/final.js')
|
|
4
5
|
|
|
5
6
|
module.exports = [
|
|
6
7
|
{
|
|
@@ -19,11 +20,11 @@ module.exports = [
|
|
|
19
20
|
checks: { type: Array, default: [] },
|
|
20
21
|
conform: { type: Object, default: {} },
|
|
21
22
|
contract: { type: Object, default: {} },
|
|
22
|
-
final:
|
|
23
|
+
final: ticketFinal,
|
|
23
24
|
repairs: { type: Array, default: [] },
|
|
24
25
|
salesrep:{type:String,default:''},
|
|
25
26
|
sitems: { type: Array, default: [] },
|
|
26
|
-
wo:
|
|
27
|
+
wo: wo,
|
|
27
28
|
todo:{type:Object, default: {}},
|
|
28
29
|
office: { type: Object, default: {} },
|
|
29
30
|
logs:{type:Array,default:[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
const {aaddress}=require('../../core-models.js');
|
|
3
|
-
|
|
3
|
+
const wo = require('./subs/jonaswo.js')
|
|
4
|
+
const ticketFinal = require('./subs/final.js')
|
|
4
5
|
|
|
5
6
|
module.exports = [
|
|
6
7
|
{
|
|
@@ -19,11 +20,11 @@ module.exports = [
|
|
|
19
20
|
checks: { type: Array, default: [] },
|
|
20
21
|
conform: { type: Object, default: {} },
|
|
21
22
|
contract: { type: Object, default: {} },
|
|
22
|
-
final:
|
|
23
|
+
final: ticketFinal,
|
|
23
24
|
repairs: { type: Array, default: [] },
|
|
24
25
|
salesrep:{type:String,default:''},
|
|
25
26
|
sitems: { type: Array, default: [] },
|
|
26
|
-
wo:
|
|
27
|
+
wo: wo,
|
|
27
28
|
todo:{type:Object, default: {}},
|
|
28
29
|
office: { type: Object, default: {} },
|
|
29
30
|
logs:{type:Array,default:[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const { Schema } = require('mongoose')
|
|
2
|
+
|
|
3
|
+
let ticketInvoice = new Schema({
|
|
4
|
+
total:{type:Number,default:0},
|
|
5
|
+
pricelevel:{type:String,default:''}
|
|
6
|
+
})
|
|
7
|
+
let ticketTime = new Schema({
|
|
8
|
+
startTime:{type:Date,default:''},
|
|
9
|
+
endTime:{type:Date,default:''},
|
|
10
|
+
totalTime:{type:Number,default:0},
|
|
11
|
+
revenuePer:{type:Number,default:0}
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
let ticketFinal = new Schema({
|
|
15
|
+
showReplacement:{type:Boolean,default:false},
|
|
16
|
+
conform:{type:Object,default:{}},
|
|
17
|
+
invoice:ticketInvoice,
|
|
18
|
+
signature:{type:String,default:''},
|
|
19
|
+
emailed:{type:Boolean,default:false},
|
|
20
|
+
paymentMethod:{type:'String',default:''},
|
|
21
|
+
returnVisit:{type:Boolean,default:false},
|
|
22
|
+
returnNotes:{type:String,default:''},
|
|
23
|
+
addlDetails:{type:String,default:''},
|
|
24
|
+
serviceReferral:{type:Boolean,default:false},
|
|
25
|
+
ticketTime:ticketTime,
|
|
26
|
+
timelog:{type:Object,default:{}},
|
|
27
|
+
completedBy:{type:String,default:''}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
module.exports = ticketFinal
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const { Schema } = require('mongoose')
|
|
2
|
+
module.exports = new Schema({
|
|
3
|
+
id:{type:String,default:''},
|
|
4
|
+
custcode:{type:String,default:''},
|
|
5
|
+
contactname:{type:String,default:''},
|
|
6
|
+
contactphone:{type:String,default:''},
|
|
7
|
+
contactemail:{type:String,default:''},
|
|
8
|
+
customername:{type:String,default:''},
|
|
9
|
+
descr:{type:String,default:''},
|
|
10
|
+
street:{type:String,default:''},
|
|
11
|
+
cityzip:{type:String,default:''},
|
|
12
|
+
unit:{type:String,default:''},
|
|
13
|
+
state:{type:String,default:''},
|
|
14
|
+
takenby:{type:String,default:''},
|
|
15
|
+
dept:{type:String,default:''},
|
|
16
|
+
cat:{type:String,default:''},
|
|
17
|
+
leadsource:{type:String,default:''},
|
|
18
|
+
status:{type:String,default:''},
|
|
19
|
+
jobref:{type:String,default:''},
|
|
20
|
+
conref:{type:String,default:''},
|
|
21
|
+
ref:{type:String,default:''},
|
|
22
|
+
pricebook:{type:String,default:''},
|
|
23
|
+
pricelevel:{type:String,default:''},
|
|
24
|
+
salesrep:{type:String,default:''},
|
|
25
|
+
tech:{type:String,default:''},
|
|
26
|
+
datecall:{type:Date,default:''},
|
|
27
|
+
timecall:{type:String,default:''},
|
|
28
|
+
dateorder:{type:Date,default:''},
|
|
29
|
+
timeorder:{type:String,default:''},
|
|
30
|
+
dateschedule:{type:Date,default:''},
|
|
31
|
+
timeschedule:{type:String,default:''},
|
|
32
|
+
datearrival:{type:Date,default:''},
|
|
33
|
+
timearrival:{type:String,default:''},
|
|
34
|
+
datecomplete:{type:Date,default:''},
|
|
35
|
+
timecomplete:{type:String,default:''},
|
|
36
|
+
datecompletesched:{type:Date,default:''},
|
|
37
|
+
timecompletesched:{type:String,default:''}
|
|
38
|
+
})
|