database-connector 2.0.1 → 2.0.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/CHANGELOG.md CHANGED
@@ -32,11 +32,6 @@
32
32
  - Property types and descriptions with nested object structures
33
33
  - Enum values for restricted fields and default values
34
34
  - Format specifications (date-time, etc.) and example data for each model
35
-
36
- - **Policy Model Export**: Converted `Policy.js` from schema-only export to a full standalone model
37
- - Now exports both `policySchema` (for embedding) and `Policy` model (for standalone use)
38
- - Maintains backward compatibility with existing code using `policySchema`
39
- - Added `model` import from mongoose
40
35
 
41
36
  ### Changed
42
37
 
package/models/Policy.js CHANGED
@@ -1,4 +1,4 @@
1
- const { Schema, model } = require('mongoose');
1
+ const { Schema } = require('mongoose');
2
2
 
3
3
  /**
4
4
  * @swagger
@@ -211,4 +211,6 @@ const policySchema = new Schema(
211
211
  {}
212
212
  );
213
213
 
214
- module.exports = model('Policy', policySchema);
214
+ module.exports = {
215
+ policySchema
216
+ };
package/models/index.js CHANGED
@@ -32,7 +32,7 @@ const SubscriptionOffer = require('./SubscriptionOffer');
32
32
  const FlashDeal = require('./FlashDeal');
33
33
  const Notification = require('./Notification');
34
34
  const PaymentType = require('./PaymentType');
35
- const Policy = require('./Policy');
35
+ const { policySchema } = require('./Policy');
36
36
  const ReductionOffer = require('./ReductionOffer');
37
37
  const Sale = require('./Sale');
38
38
  const StoreCategory = require('./StoreCategory');
@@ -44,7 +44,7 @@ module.exports = {
44
44
  configure: config.configure,
45
45
  getConfig: config.getConfig,
46
46
  PaymentType,
47
- Policy,
47
+ policySchema,
48
48
  ReductionOffer,
49
49
  Sale,
50
50
  StoreCategory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.0.1",
3
+ "version": "2.0.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": {