database-connector 2.3.12 → 2.3.13

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/Payment.js CHANGED
@@ -33,6 +33,12 @@ const mongoose = require('mongoose');
33
33
  * paymentStatus:
34
34
  * type: string
35
35
  * description: Status of the payment
36
+ * enum:
37
+ * - pending
38
+ * - processing
39
+ * - completed
40
+ * - failed
41
+ * - refunded
36
42
  * paymentAmount:
37
43
  * type: number
38
44
  * description: Payment amount
@@ -99,6 +105,8 @@ const paymentSchema = new mongoose.Schema(
99
105
  paymentStatus: {
100
106
  type: String,
101
107
  required: true,
108
+ enum: ['pending', 'processing', 'completed', 'failed', 'refunded'],
109
+ default: 'pending',
102
110
  },
103
111
  paymentAmount: {
104
112
  type: Number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "database-connector",
3
- "version": "2.3.12",
3
+ "version": "2.3.13",
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": {