database-connector 2.4.7 → 2.4.8

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.
@@ -19,6 +19,7 @@ const buildSubscriptionHistorySnapshot = (subscriptionDoc) => ({
19
19
  startDate: subscriptionDoc.startDate,
20
20
  endDate: subscriptionDoc.endDate,
21
21
  notes: subscriptionDoc.notes,
22
+ createdAt: new Date(),
22
23
  });
23
24
 
24
25
  const recordSubscriptionHistory = async (subscriptionDoc) => {
@@ -323,6 +324,10 @@ const subscriptionSchema = new mongoose.Schema(
323
324
  type: String,
324
325
  default: null,
325
326
  },
327
+ createdAt: {
328
+ type: Date,
329
+ default: Date.now,
330
+ },
326
331
  },
327
332
  ],
328
333
  upcomingSubscriptions: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
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": {