@francesco_ksh/app-ksh-mgd-schemas 2.3.7 → 2.3.9

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/index.js CHANGED
@@ -34,6 +34,13 @@ const counterSchema = require('./models/Counter');
34
34
  const crossListingSchema = require('./models/CrossListing');
35
35
  const exploreCardSchema = require('./models/ExploreCard');
36
36
  const bonusSchema = require('./models/Bonus');
37
+ const payoutContactSchema = require('./models/PayoutContact');
38
+
39
+ // Register Counter model so it's available when User.js and other models try to use it
40
+ const mongoose = require('mongoose');
41
+ if (!mongoose.models.Counter) {
42
+ mongoose.model('Counter', counterSchema);
43
+ }
37
44
 
38
45
  module.exports = {
39
46
  adminReviewSchema,
@@ -72,4 +79,5 @@ module.exports = {
72
79
  crossListingSchema,
73
80
  exploreCardSchema,
74
81
  bonusSchema,
82
+ payoutContactSchema,
75
83
  };
package/models/Order.js CHANGED
@@ -482,6 +482,12 @@ const orderSchema = new Schema(
482
482
  serviceCode: {
483
483
  type: String,
484
484
  },
485
+ readyReturnsUniqueOrderId: {
486
+ type: String,
487
+ },
488
+ readyReturnsPrimaryOrderId: {
489
+ type: String,
490
+ },
485
491
  },
486
492
  bolLink: {
487
493
  type: String,
@@ -0,0 +1,98 @@
1
+ const mongoose = require('mongoose');
2
+ const Schema = mongoose.Schema;
3
+
4
+ const payoutContactSchema = new Schema({
5
+ contactName: {
6
+ type: String,
7
+ },
8
+ contactEmail: {
9
+ type: String,
10
+ },
11
+ contactPhone: {
12
+ type: String,
13
+ },
14
+ contactImage: {
15
+ type: String,
16
+ },
17
+ isFrom: {
18
+ type: String,
19
+ enum: ['kashew', 'moverr'],
20
+ },
21
+ userType: {
22
+ type: String,
23
+ enum: ['user', 'carrier'],
24
+ },
25
+ venmoHandle: {
26
+ type: String,
27
+ },
28
+ venmoPhone: {
29
+ type: String,
30
+ },
31
+
32
+ paypalEmail: {
33
+ type: String,
34
+ },
35
+ paypalPhone: {
36
+ type: String,
37
+ },
38
+ verified: {
39
+ type: Boolean,
40
+ default: false,
41
+ },
42
+ pendingPayouts: [
43
+ {
44
+ amount: {
45
+ type: Number,
46
+ },
47
+ date: {
48
+ type: Date,
49
+ },
50
+ payoutBatchId: {
51
+ type: String,
52
+ },
53
+ accountType: {
54
+ type: String,
55
+ enum: ['venmo', 'paypal'],
56
+ },
57
+ requestedOn: {
58
+ type: Date,
59
+ },
60
+ },
61
+ ],
62
+ pastPayouts: [
63
+ {
64
+ amount: {
65
+ type: Number,
66
+ },
67
+ date: {
68
+ type: Date,
69
+ },
70
+ payoutBatchId: {
71
+ type: String,
72
+ },
73
+ accountType: {
74
+ type: String,
75
+ enum: ['venmo', 'paypal'],
76
+ },
77
+ requestedOn: {
78
+ type: Date,
79
+ },
80
+ paidOn: {
81
+ type: Date,
82
+ },
83
+ paidBy: {
84
+ type: Schema.Types.ObjectId,
85
+ ref: 'User',
86
+ },
87
+ },
88
+ ],
89
+ mongooseId: {
90
+ type: String,
91
+ },
92
+ date: {
93
+ type: Date,
94
+ default: Date.now,
95
+ },
96
+ });
97
+
98
+ module.exports = payoutContactSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@francesco_ksh/app-ksh-mgd-schemas",
3
- "version": "2.3.7",
3
+ "version": "2.3.9",
4
4
  "description": "Mongoose schema definitions",
5
5
  "main": "index.js",
6
6
  "repository": {