database-connector 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/models/index.js +36 -19
  2. package/package.json +1 -1
package/models/index.js CHANGED
@@ -13,23 +13,40 @@ const connectToDatabase = async (databaseUrl) => {
13
13
  }
14
14
  };
15
15
 
16
+ // Import des modèles
17
+ const Cart = require('./Cart');
18
+ const Product = require('./Product');
19
+ const View = require('./View');
20
+ const User = require('./User');
21
+ const Order = require('./Order');
22
+ const Bill = require('./Bill');
23
+ const Payment = require('./Payment');
24
+ const Store = require('./Store');
25
+ const Offer = require('./Offer');
26
+ const Category = require('./Category');
27
+ const ResetPassword = require('./ResetPassword');
28
+ const StoreRate = require('./StoreRate');
29
+ const Subscription = require('./Subscription');
30
+ const Plan = require('./Plan');
31
+ const SubscriptionOffer = require('./SubscriptionOffer');
16
32
 
17
-
18
-
19
- module.exports = require('./Cart');
20
- module.exports = require('./Product');
21
- module.exports = require('./View');
22
- module.exports = require('./User');
23
- module.exports = require('./Order');
24
- module.exports = require('./Bill');
25
- module.exports = require('./Payment');
26
- module.exports = require('./Store');
27
- module.exports = require('./Offer');
28
- module.exports = require('./Category');
29
- module.exports = require('./ResetPassword');
30
- module.exports = require('./StoreRate');
31
- module.exports = require('./Subscription');
32
- module.exports = require('./Plan');
33
- module.exports = require('./SubscriptionOffer');
34
- module.exports.connectToDatabase = connectToDatabase;
35
-
33
+ // Exportation
34
+ module.exports = {
35
+ connectToDatabase,
36
+ Cart,
37
+ Product,
38
+ View,
39
+ User,
40
+ Order,
41
+ Bill,
42
+ Payment,
43
+ Store,
44
+ Offer,
45
+ Category,
46
+ ResetPassword,
47
+ StoreRate,
48
+ Subscription,
49
+ Plan,
50
+ SubscriptionOffer,
51
+ ObjectId: mongoose.Types.ObjectId,
52
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "models/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"