goldstars-services 1.0.24 → 1.0.26

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,6 +15,12 @@ var bikeSchema = new _mongoose.default.Schema({
15
15
  type: String,
16
16
  required: true
17
17
  },
18
+ location: {
19
+ type: String,
20
+ enum: ['C.C Las Virtudes', 'Sambil Paraguaná', 'MULTISEDE'],
21
+ // Sedes donde el plan es válido
22
+ required: true
23
+ },
18
24
  model: {
19
25
  type: String,
20
26
  required: true
@@ -45,6 +45,19 @@ var updateBike = (queryParams, paramsToUpdate) => {
45
45
  return _bike.default.findOneAndUpdate(queryParams, paramsToUpdate, mongooseOptions);
46
46
  };
47
47
 
48
+ /**
49
+ * @description Change masive status of all bikes
50
+ * @param {Object} queryParams
51
+ * @param {String} status
52
+ * @returns Promise<BikeModel>
53
+ *
54
+ */
55
+ var changeMasiveStatus = (queryParams, status) => {
56
+ return _bike.default.updateMany(queryParams, {
57
+ status
58
+ });
59
+ };
60
+
48
61
  /**
49
62
  * @description Delete bike
50
63
  * @param {Object} queryParams
@@ -58,5 +71,6 @@ var _default = exports.default = {
58
71
  createBike,
59
72
  getAllBikes,
60
73
  updateBike,
74
+ changeMasiveStatus,
61
75
  deleteBike
62
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goldstars-services",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "This is the services layer for GoldStars",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {