database-connector 2.5.2 → 2.5.3

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/models/Product.js CHANGED
@@ -57,7 +57,7 @@ const { policySchema } = require('database-connector/models/Policy');
57
57
  * description: Product tags
58
58
  * sellerId:
59
59
  * type: string
60
- * description: Reference to seller
60
+ * description: Reference to seller (User model)
61
61
  * storeId:
62
62
  * type: string
63
63
  * description: Reference to store
@@ -162,7 +162,7 @@ const productSchema = new mongoose.Schema(
162
162
  ],
163
163
  sellerId: {
164
164
  type: mongoose.Schema.Types.ObjectId,
165
- ref: 'Seller',
165
+ ref: 'User',
166
166
  required: true,
167
167
  },
168
168
  storeId: {
package/models/Sale.js CHANGED
@@ -37,7 +37,7 @@ const mongoose = require('mongoose');
37
37
  * region: "North Region"
38
38
  */
39
39
  const Sale = new mongoose.Schema({
40
- sellerId: { type: mongoose.Schema.Types.ObjectId, ref: 'Seller' },
40
+ sellerId: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
41
41
  storeId: { type: mongoose.Schema.Types.ObjectId, ref: 'Store' },
42
42
  productId: { type: mongoose.Schema.Types.ObjectId, ref: 'Product' },
43
43
  date: { type: Date, required: true },
package/models/View.js CHANGED
@@ -41,7 +41,7 @@ const mongoose = require('mongoose');
41
41
  * region: "North Region"
42
42
  */
43
43
  const viewsSchema = new mongoose.Schema({
44
- sellerId: { type: mongoose.Schema.Types.ObjectId, ref: 'Seller' },
44
+ sellerId: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
45
45
  clientId: { type: mongoose.Schema.Types.ObjectId, ref: 'Client' },
46
46
  storeId: { type: mongoose.Schema.Types.ObjectId, ref: 'Store' },
47
47
  productId: { type: mongoose.Schema.Types.ObjectId, ref: 'Product' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "MongoDB models package with Mongoose schemas for e-commerce applications. Includes User, Product, Store, Order and more with built-in validation and virtual properties.",
5
5
  "main": "models/index.js",
6
6
  "scripts": {