vhp-mongo-models 2.1.86 → 2.1.88
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/Company/schemas/department.js +1 -1
- package/HouseHolds/schemas/home.js +73 -66
- package/HouseHolds/schemas/lead.js +2 -0
- package/HouseHolds/schemas/serviceitem.js +53 -53
- package/Pricing/schemas/additions.js +25 -24
- package/Pricing/schemas/financing.js +12 -12
- package/Pricing/schemas/pricing350.js +3 -3
- package/Pricing/schemas/subs/books.js +5 -5
- package/Replacement/schemas/projects.js +9 -7
- package/package.json +13 -15
|
@@ -3,7 +3,7 @@ module.exports=[
|
|
|
3
3
|
code: {type:String,default:''},
|
|
4
4
|
name: { type: String, default: '' },
|
|
5
5
|
coid: { type: String, default: '' },
|
|
6
|
-
types: {type:Array,default:[]},
|
|
6
|
+
types: {type:Array,default:[]}, // PROJECT | SERVICE | MEMBERSHIP
|
|
7
7
|
building: {type:Array,default:[]} //RES | COM
|
|
8
8
|
}
|
|
9
9
|
]
|
|
@@ -3,74 +3,81 @@
|
|
|
3
3
|
* - hhid - {unique:true,name:"hhid"}
|
|
4
4
|
*/
|
|
5
5
|
module.exports = [{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
hhid: { type: String, default: '' },
|
|
7
|
+
type: { type: String, default: '' },//COM | RES
|
|
8
|
+
name: { type: String, default: '' },
|
|
9
|
+
street: { type: String, default: '' },
|
|
10
|
+
unit: { type: String, default: '' },
|
|
11
|
+
city: { type: String, default: '' },
|
|
12
|
+
state: { type: String, default: '' },
|
|
13
|
+
zip: { type: String, default: '' },
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
oldcodes:{type:Array, default:[]},
|
|
19
|
-
billto: {type:Boolean,default: false}, //if it is a billing address for other homes
|
|
20
|
-
salesRep:{type:String,default:''},
|
|
21
|
-
|
|
22
|
-
notes:{type:String,default:''},
|
|
15
|
+
custid: { type: String, default: '' }, //phone number / billTo
|
|
16
|
+
phone: { type: String, default: '' }, //temp contact
|
|
17
|
+
email: { type: String, default: '' }, //temp contact
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
geoid: null,
|
|
30
|
-
geocode: {
|
|
31
|
-
lat: null,
|
|
32
|
-
lng: null
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
19
|
+
occupants: { type: Array, default: [] },
|
|
20
|
+
jonascodes: { type: Array, default: [] }, //new add
|
|
21
|
+
oldcodes: { type: Array, default: [] },
|
|
22
|
+
billto: { type: Boolean, default: false }, //if it is a billing address for other homes
|
|
23
|
+
salesRep: { type: String, default: '' },
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
25
|
+
financecode: { type: String, default: '' }, //FinanceChargeCode
|
|
26
|
+
taxapplicable: { type: String, default: '' }, //SalesTaxApplicable
|
|
27
|
+
taxgroup: { type: String, default: '' }, //SalesTaxGroup
|
|
28
|
+
|
|
29
|
+
notes: { type: String, default: '' },
|
|
30
|
+
|
|
31
|
+
location: {
|
|
32
|
+
type: Object, default: {
|
|
33
|
+
building_id: '',
|
|
34
|
+
gers: null,
|
|
35
|
+
upi: null,
|
|
36
|
+
geoid: null,
|
|
37
|
+
geocode: {
|
|
38
|
+
lat: null,
|
|
39
|
+
lng: null
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
utilities: { type: Array, default: [] },// gas | electric | water | etc
|
|
45
|
+
measurements: { type: Object, default: {} },
|
|
46
|
+
features: {
|
|
47
|
+
elecService: {
|
|
48
|
+
panel: { type: String, default: '' },
|
|
49
|
+
serviceSize: { type: String, default: '' },
|
|
50
|
+
wireType: { type: String, default: '' },
|
|
51
|
+
provider: { type: String, default: '' }
|
|
52
|
+
},
|
|
53
|
+
gasService: {
|
|
54
|
+
provider: { type: String, default: '' },
|
|
55
|
+
type: { type: String, default: '' }
|
|
56
|
+
},
|
|
57
|
+
roof: {
|
|
58
|
+
roofTint: { type: String, default: '' },
|
|
59
|
+
roofMake: { type: String, default: '' },
|
|
60
|
+
pitch: { type: String, default: '' },
|
|
61
|
+
gutters: {
|
|
62
|
+
material: { type: String, default: '' },
|
|
63
|
+
feet: { type: Number, default: 0 }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
waterheater: {
|
|
67
|
+
capacity: { type: Number, default: 0 },
|
|
68
|
+
btus: { type: Number, default: 0 },
|
|
69
|
+
type: { type: String, default: '' },
|
|
70
|
+
condition: { type: Number, default: '' }
|
|
71
|
+
},
|
|
72
|
+
foundation: { type: String, default: '' },
|
|
73
|
+
frontFace: { type: String, default: '' },
|
|
74
|
+
buildYear: { type: Number, default: 0 },
|
|
75
|
+
sqft: { type: Number, default: 0 },
|
|
76
|
+
floors: { type: Number, default: 0 },
|
|
77
|
+
baths: { type: Number, default: 0 },
|
|
78
|
+
rooms: { type: Number, default: 0 }
|
|
79
|
+
},
|
|
80
|
+
spaces: { type: Array, default: [] },//remove
|
|
74
81
|
},
|
|
75
82
|
{ minimize: false }
|
|
76
83
|
]
|
|
@@ -87,4 +94,4 @@ module.exports = [{
|
|
|
87
94
|
* custcode:{type:String,default:''},
|
|
88
95
|
* billto:{type:String,default:''}
|
|
89
96
|
* }]
|
|
90
|
-
*/
|
|
97
|
+
*/
|
|
@@ -9,6 +9,8 @@ module.exports = [
|
|
|
9
9
|
id:{type:String,default:''},
|
|
10
10
|
hhid:{type: String, default:''},
|
|
11
11
|
custid:{type: String, default:''},//person calling in, could be the occupant
|
|
12
|
+
phone:{type:String,default:''}, //this will replace custid
|
|
13
|
+
phone2:{type:String,default:''},
|
|
12
14
|
email:{type:String, default:''},
|
|
13
15
|
clientfirst:{type:String, default:''},
|
|
14
16
|
clientlast:{type:String, default:''},
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
module.exports = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
2
|
+
{
|
|
3
|
+
//VHP ADD fields
|
|
4
|
+
hhid: { type: String, default: '' }, //must have a hhid
|
|
5
|
+
coid: { type: String, default: '' },//need to link from JONAS
|
|
6
|
+
group: { type: String, default: '' },//names the type of product it is. Would like to use this instead of type
|
|
7
|
+
considerreplace: { type: Date, default: '' },
|
|
8
|
+
quantity: { type: Number, default: 1 }, //optional qty
|
|
9
|
+
notes: { type: Array, default: [] },// for better history {tech:'',date:'',ticketId:''}
|
|
10
|
+
tags: { type: Array, default: [] },
|
|
11
|
+
|
|
12
|
+
//JONAS props
|
|
13
|
+
id: { type: String, default: '' }, //must have an id, should match JONAS "lineNumberUnique"
|
|
14
|
+
linenum: { type: String, default: '' },
|
|
15
|
+
custcode: { type: String, default: '' }, //linked custcode in JONAS
|
|
16
|
+
tagid: { type: String, default: '' },
|
|
17
|
+
type: { type: String, default: '' },//understand what this is in jonas
|
|
18
|
+
descr: { type: String, default: '' },
|
|
19
|
+
status: { type: String, default: '' },//should be 'A' for active. Need to find other codes. Match JONAS
|
|
20
|
+
insdate: { type: Date, default: '' },
|
|
21
|
+
|
|
22
|
+
model: { type: String, default: '' },
|
|
23
|
+
serial: { type: String, default: '' },
|
|
24
|
+
manf: { type: String, default: '' },
|
|
25
|
+
|
|
26
|
+
location: { type: String, default: '' },//remove, same as space / sub space
|
|
27
|
+
area: { type: String, default: '' },//
|
|
28
|
+
|
|
29
|
+
controls: { type: String, default: '' },
|
|
30
|
+
elec: { type: String, default: '' },
|
|
31
|
+
|
|
32
|
+
warr1: { type: Number, default: 0 },
|
|
33
|
+
warr2: { type: Number, default: 0 },
|
|
34
|
+
warr3: { type: Number, default: 0 },
|
|
35
|
+
|
|
36
|
+
expry1: { type: Date, default: '' },
|
|
37
|
+
expry2: { type: Date, default: '' },
|
|
38
|
+
expry3: { type: Date, default: '' },
|
|
39
|
+
|
|
40
|
+
//Custom Info
|
|
41
|
+
filt1: { type: String, default: '' },
|
|
42
|
+
filt1q: { type: String, default: '0' },
|
|
43
|
+
filt2: { type: String, default: '' },
|
|
44
|
+
filt2q: { type: String, default: '0' },
|
|
45
|
+
filt3: { type: String, default: '' },
|
|
46
|
+
filt3q: { type: String, default: '' }
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
// edits:{type:Object,defualt:{}}, //to track all of the fields that have been changed since sync
|
|
50
|
+
// system:{type:String,default:''}, //way to link related service items
|
|
51
|
+
// space:{type:String,default:''},
|
|
52
|
+
// subspace:{type:String,default:''},
|
|
53
|
+
},
|
|
54
|
+
{ minimize: false }
|
|
55
55
|
]
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
module.exports = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
{
|
|
3
|
+
name: { type: String, default: '' },
|
|
4
|
+
cat: { type: String, default: '' },
|
|
5
|
+
type: { type: String, default: '' },
|
|
6
|
+
notes: { type: String, default: '' },
|
|
7
|
+
pricesale: { type: Number, default: 0 },
|
|
8
|
+
unit: { type: String, default: '' },
|
|
9
|
+
priceRange: { type: Array, default: [] },
|
|
10
|
+
pricededuct: { type: Number, default: 0 }, //price to take off
|
|
11
|
+
labor: { type: Number, default: 0 },
|
|
12
|
+
laborpart: { type: Number, default: 0 },
|
|
13
|
+
mfg: { type: String, default: '' },
|
|
14
|
+
model: { type: String, default: '' },
|
|
15
|
+
builtinCode: { type: String, default: '' },
|
|
16
|
+
builtinType: { type: String, default: '' },
|
|
17
|
+
variants: { type: Array, default: [] } // should actually default to false if possible
|
|
18
|
+
}, {}
|
|
18
19
|
]
|
|
19
20
|
|
|
20
21
|
/*
|
|
21
22
|
priceRange = [{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
"min": number,
|
|
24
|
+
"max": number,
|
|
25
|
+
"price": number,
|
|
26
|
+
"rate": number,
|
|
27
|
+
"laborField": number,
|
|
28
|
+
"laborShop": number,
|
|
29
|
+
"crewSize": number
|
|
29
30
|
}]
|
|
30
|
-
*/
|
|
31
|
+
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
{
|
|
3
|
+
planCode: { type: String, default: '' }, //the financing code
|
|
4
|
+
lenderCode: { type: String, default: '' }, //the financing code
|
|
5
|
+
stdRate: { type: Number, default: 0 },
|
|
6
|
+
creditRate: { type: Number, default: 0 },
|
|
7
|
+
rateFactor: { type: String, default: 0 },
|
|
8
|
+
term: { type: String, default: '' },
|
|
9
|
+
desc: { type: String, default: '' },
|
|
10
|
+
min: { type: Number, default: 0 },
|
|
11
|
+
max: { type: Number, default: 0 },
|
|
12
|
+
manf: { type: String, default: '' }
|
|
13
|
+
}, {}
|
|
14
14
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
version: { type: String, default: 'dev' },
|
|
3
|
+
type: { type: String, default: '' },
|
|
4
|
+
date: { type: Date, default: Date.now },
|
|
5
|
+
pkid: { type: String, default: '' }
|
|
6
|
+
}
|
|
@@ -22,18 +22,20 @@ let pvvisit = {
|
|
|
22
22
|
scheduled: { type: Boolean }
|
|
23
23
|
}
|
|
24
24
|
let lead = {
|
|
25
|
-
id:{type:String,default:''},
|
|
26
|
-
apptdate: { type: Date, default: '' },
|
|
25
|
+
id:{type:String,default:''}, //sync with lead
|
|
26
|
+
apptdate: { type: Date, default: '' }, //sync with lead
|
|
27
27
|
type: { type: String, default: '' },
|
|
28
28
|
prstdate: { type: Date, default: '' },
|
|
29
|
+
callTypes:{type:Array,default:[]},
|
|
29
30
|
time: { type: String, default: '' },
|
|
30
31
|
carryover: { type: Date, default: '' },
|
|
31
32
|
prstvia: { type: String, default: '' },
|
|
32
|
-
rewards: { type: Boolean, default: false },
|
|
33
|
-
source: { type: String, default: '' },
|
|
34
|
-
generator: { type: String, default: '' },
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
rewards: { type: Boolean, default: false }, //sync with lead
|
|
34
|
+
source: { type: String, default: '' }, //sync with lead
|
|
35
|
+
generator: { type: String, default: '' }, //sync with lead
|
|
36
|
+
|
|
37
|
+
soldAmount: { type: Number, default: 0 }, //remove? would use bid
|
|
38
|
+
paid: { type: Date, default: '' } //remove? would use bid
|
|
37
39
|
}
|
|
38
40
|
let info = {
|
|
39
41
|
pkids: { type: Array, default: [] },
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
2
|
+
"name": "vhp-mongo-models",
|
|
3
|
+
"version": "2.1.88",
|
|
4
|
+
"productName": "VHP Mongo Models",
|
|
5
|
+
"description": "Mongo Models library to setup Mongoose Schemas",
|
|
6
|
+
"author": "VHPim",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": "VHP1946/vhp-mongo-models",
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"scripts": {},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"jsdoc": "^4.0.3"
|
|
13
|
+
}
|
|
14
|
+
}
|