payservedb 8.2.7 → 8.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.2.7",
3
+ "version": "8.2.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -89,7 +89,15 @@ const ticketSchema = new mongoose.Schema({
89
89
  {
90
90
  description: {
91
91
  type: String,
92
- required: false,
92
+ required: true,
93
+ },
94
+ quantity: {
95
+ type: Number,
96
+ required: true,
97
+ },
98
+ unitPrice: {
99
+ type: Number,
100
+ required: true,
93
101
  },
94
102
  amount: {
95
103
  type: Number,
@@ -121,6 +129,48 @@ const ticketSchema = new mongoose.Schema({
121
129
  type: Boolean,
122
130
  required: false,
123
131
  },
132
+ ongoingSince: {
133
+ type: Date,
134
+ required: false,
135
+ },
136
+ totalOngoingDuration: {
137
+ type: Number, // in milliseconds
138
+ default: 0,
139
+ },
140
+ cancellationReason: {
141
+ type: String,
142
+ required: false,
143
+ },
144
+ cancellationReason: {
145
+ type: String,
146
+ required: false,
147
+ },
148
+ cancelledAt: {
149
+ type: Date,
150
+ required: false,
151
+ },
152
+ cancelledBy: {
153
+ type: mongoose.Schema.Types.ObjectId,
154
+ ref: 'User',
155
+ required: false,
156
+ },
157
+ reopenedReason: {
158
+ type: String,
159
+ required: false,
160
+ },
161
+ reopenedAt: {
162
+ type: Date,
163
+ required: false,
164
+ },
165
+ reopenedBy: {
166
+ type: mongoose.Schema.Types.ObjectId,
167
+ ref: 'User',
168
+ required: false,
169
+ },
170
+ reopenCount: {
171
+ type: Number,
172
+ default: 0,
173
+ },
124
174
  }, {
125
175
  timestamps: true,
126
176
  });