@francesco_ksh/app-ksh-mgd-schemas 2.3.8 → 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,7 @@ 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');
37
38
 
38
39
  // Register Counter model so it's available when User.js and other models try to use it
39
40
  const mongoose = require('mongoose');
@@ -78,4 +79,5 @@ module.exports = {
78
79
  crossListingSchema,
79
80
  exploreCardSchema,
80
81
  bonusSchema,
82
+ payoutContactSchema,
81
83
  };
@@ -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.8",
3
+ "version": "2.3.9",
4
4
  "description": "Mongoose schema definitions",
5
5
  "main": "index.js",
6
6
  "repository": {