flykup_model_production 1.0.21 → 1.0.25
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/db_connection.js
CHANGED
|
@@ -52,7 +52,19 @@ const liveStreamInteractionSchema = new mongoose.Schema({
|
|
|
52
52
|
type: Number,
|
|
53
53
|
default: 0
|
|
54
54
|
},
|
|
55
|
+
firstJoinedAt: Date,
|
|
55
56
|
lastSeenAt: Date,
|
|
57
|
+
lastLeftAt: Date,
|
|
58
|
+
sessionCount: {
|
|
59
|
+
type: Number,
|
|
60
|
+
default: 0
|
|
61
|
+
},
|
|
62
|
+
sessions: [{
|
|
63
|
+
joinedAt: Date,
|
|
64
|
+
leftAt: Date,
|
|
65
|
+
duration: Number,
|
|
66
|
+
billed : Boolean
|
|
67
|
+
}],
|
|
56
68
|
hasLiked: {
|
|
57
69
|
type: Boolean,
|
|
58
70
|
default: false
|
package/models/admin.model.js
CHANGED
|
@@ -2,7 +2,7 @@ import mongoose from 'mongoose';
|
|
|
2
2
|
|
|
3
3
|
const { Schema } = mongoose;
|
|
4
4
|
|
|
5
|
-
const AdminSchema = new Schema(
|
|
5
|
+
const AdminSchema = new Schema(
|
|
6
6
|
{
|
|
7
7
|
name: { type: String, required: true },
|
|
8
8
|
role: { type: String, required: true, default: "admin" },
|
|
@@ -32,6 +32,22 @@ const AdminSchema = new Schema(
|
|
|
32
32
|
// admins: { readOnly: Boolean, edit: Boolean },
|
|
33
33
|
},
|
|
34
34
|
maskingSwitch: { type: Boolean, default: false },
|
|
35
|
+
// Two-Factor Authentication fields
|
|
36
|
+
twoFactorSecret: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
twoFactorEnabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
twoFactorBackupCodes: [{
|
|
45
|
+
type: String
|
|
46
|
+
}],
|
|
47
|
+
twoFactorEnabledAt: {
|
|
48
|
+
type: Date,
|
|
49
|
+
default: null
|
|
50
|
+
}
|
|
35
51
|
},
|
|
36
52
|
{ timestamps: true }
|
|
37
53
|
);
|
package/models/assets.model.js
CHANGED
package/models/user.model.js
CHANGED
|
@@ -163,6 +163,11 @@ const UserSchema = new mongoose.Schema(
|
|
|
163
163
|
type: String,
|
|
164
164
|
enum: ["pending","profile_setup", "completed"],
|
|
165
165
|
default: "completed" // Default to completed for existing users
|
|
166
|
+
},
|
|
167
|
+
preferredPayment: {
|
|
168
|
+
type: String,
|
|
169
|
+
enum: ["flykup_balance", "payment_gateway", null],
|
|
170
|
+
default: null,
|
|
166
171
|
},
|
|
167
172
|
deviceInfo: {
|
|
168
173
|
deviceId: { type: String, default: null },
|