database-connector 2.2.0 → 2.2.1

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/Payment.js +1 -13
  2. package/package.json +1 -1
package/models/Payment.js CHANGED
@@ -55,11 +55,6 @@ const mongoose = require('mongoose');
55
55
  * type: number
56
56
  * default: 0
57
57
  * description: Total price
58
- * transactions:
59
- * type: array
60
- * items:
61
- * type: string
62
- * description: References to related transactions
63
58
  * token:
64
59
  * type: string
65
60
  * description: Payment token
@@ -79,7 +74,6 @@ const mongoose = require('mongoose');
79
74
  * paymentCurrency: "USD"
80
75
  * paymentMethodId: "507f1f77bcf86cd799439020"
81
76
  * totalPrice: 150.00
82
- * transactions: ["507f1f77bcf86cd799439111", "507f1f77bcf86cd799439112"]
83
77
  * createdAt: "2025-12-07T10:30:00.000Z"
84
78
  * updatedAt: "2025-12-07T10:30:00.000Z"
85
79
  */
@@ -135,13 +129,7 @@ const paymentSchema = new mongoose.Schema(
135
129
  required: true,
136
130
  default: 0,
137
131
  },
138
- transactions: [
139
- {
140
- type: mongoose.Schema.Types.ObjectId,
141
- ref: 'Transaction',
142
- required: false,
143
- }
144
- ],
132
+ // transactions field removed: Transactions are no longer tracked as a separate model
145
133
  timestamps: {
146
134
  type: Date,
147
135
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
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": {