vhp-mongo-models 1.6.3 → 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 = new Schema({
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 = new Schema({
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
 
@@ -6,5 +6,5 @@ module.exports = [
6
6
  ...aticket,
7
7
  status: { type: String, default: 'complete' }, // active, complete, archived
8
8
  documents: { type: Array, default: [] } //could get rid of
9
- }
9
+ },{minimize:false}
10
10
  ]
@@ -1,5 +1,5 @@
1
1
  const { Schema } = require('mongoose')
2
- module.exports = new Schema({
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: [] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhp-mongo-models",
3
- "version": "1.6.3",
3
+ "version": "2.0.0",
4
4
  "productName": "VHP Mongo Models",
5
5
  "description": "Mongo Models library to setup Mongoose Schemas",
6
6
  "author": "VHPim",