flykup_model_development 3.1.51 → 3.1.53
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/shows.model.js +1 -1
- package/models/user.model.js +15 -50
- package/package.json +1 -1
package/models/shows.model.js
CHANGED
package/models/user.model.js
CHANGED
|
@@ -7,57 +7,22 @@ import Seller from "./seller.model.js";
|
|
|
7
7
|
const UserSchema = new mongoose.Schema(
|
|
8
8
|
{
|
|
9
9
|
devices: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
lastLogin: { type: Date, default: Date.now },
|
|
19
|
-
lastLogout: { type: Date },
|
|
20
|
-
isActive: { type: Boolean, default: true },
|
|
21
|
-
_id: false,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
devices: [
|
|
25
|
-
{
|
|
26
|
-
deviceId: { type: String, required: true },
|
|
27
|
-
snsEndpointArn: { type: String }, // Store SNS endpoint ARN
|
|
28
|
-
fcmToken: { type: String }, // ✅ Keep FCM token during migration
|
|
29
|
-
platform: {
|
|
30
|
-
type: String,
|
|
31
|
-
enum: ["web", "android", "ios", "mobile-web"],
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
lastLogin: { type: Date, default: Date.now },
|
|
35
|
-
lastLogout: { type: Date },
|
|
36
|
-
isActive: { type: Boolean, default: true },
|
|
37
|
-
_id: false,
|
|
10
|
+
{
|
|
11
|
+
deviceId: { type: String, required: true },
|
|
12
|
+
fcmToken: { type: String, required: true },
|
|
13
|
+
snsEndpointArn: { type: String, default: null }, // New field for SNS
|
|
14
|
+
platform: {
|
|
15
|
+
type: String,
|
|
16
|
+
enum: ["web", "android", "ios", "mobile-web"],
|
|
17
|
+
required: true,
|
|
38
18
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// // Web Push for browsers
|
|
48
|
-
// webPushSubscription: { type: Object }, // Stores the PushSubscription object
|
|
49
|
-
|
|
50
|
-
// platform: {
|
|
51
|
-
// type: String,
|
|
52
|
-
// enum: ["web", "android", "ios", "mobile-web"],
|
|
53
|
-
// required: true,
|
|
54
|
-
// },
|
|
55
|
-
// lastLogin: { type: Date, default: Date.now },
|
|
56
|
-
// lastLogout: { type: Date },
|
|
57
|
-
// isActive: { type: Boolean, default: true },
|
|
58
|
-
// _id: false,
|
|
59
|
-
// },
|
|
60
|
-
// ],
|
|
19
|
+
lastLogin: { type: Date, default: Date.now },
|
|
20
|
+
lastLogout: { type: Date },
|
|
21
|
+
isActive: { type: Boolean, default: true },
|
|
22
|
+
_id: false,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
|
|
61
26
|
sellerInfo: { type: mongoose.Schema.Types.ObjectId, ref: "sellers" },
|
|
62
27
|
dropshipperInfo: { type: mongoose.Schema.Types.ObjectId, ref: "dropshippers" },
|
|
63
28
|
categories: { type: [String], default: [], maxLength: 100 },
|