database-connector 2.3.5 → 2.3.7
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/FlashDeal.js +2 -2
- package/models/Offer.js +2 -2
- package/models/Settings.js +9 -0
- package/package.json +1 -1
package/models/FlashDeal.js
CHANGED
|
@@ -69,7 +69,7 @@ const mongoose = require('mongoose');
|
|
|
69
69
|
* description: Campaign objective - target followers, specific users, or all users
|
|
70
70
|
* campaignPurpose:
|
|
71
71
|
* type: string
|
|
72
|
-
* enum: [increase_revenue, attract_new_clients]
|
|
72
|
+
* enum: [increase_revenue, attract_new_clients, null]
|
|
73
73
|
* description: Campaign purpose (only when campaignObjective is 'all')
|
|
74
74
|
* targetUserIds:
|
|
75
75
|
* type: array
|
|
@@ -190,7 +190,7 @@ const FlashDealSchema = new mongoose.Schema(
|
|
|
190
190
|
},
|
|
191
191
|
campaignPurpose: {
|
|
192
192
|
type: String,
|
|
193
|
-
enum: ['increase_revenue', 'attract_new_clients'],
|
|
193
|
+
enum: ['increase_revenue', 'attract_new_clients', null],
|
|
194
194
|
default: null,
|
|
195
195
|
},
|
|
196
196
|
targetUserIds: [
|
package/models/Offer.js
CHANGED
|
@@ -65,7 +65,7 @@ const mongoose = require('mongoose');
|
|
|
65
65
|
* description: Who can see this offer
|
|
66
66
|
* campaignPurpose:
|
|
67
67
|
* type: string
|
|
68
|
-
* enum: [increase_revenue, attract_new_clients]
|
|
68
|
+
* enum: [increase_revenue, attract_new_clients, null]
|
|
69
69
|
* description: Campaign purpose (only when type is 'all')
|
|
70
70
|
* userIds:
|
|
71
71
|
* type: array
|
|
@@ -165,7 +165,7 @@ const OfferSchema = new mongoose.Schema(
|
|
|
165
165
|
},
|
|
166
166
|
campaignPurpose: {
|
|
167
167
|
type: String,
|
|
168
|
-
enum: ['increase_revenue', 'attract_new_clients'],
|
|
168
|
+
enum: ['increase_revenue', 'attract_new_clients', null],
|
|
169
169
|
default: null,
|
|
170
170
|
},
|
|
171
171
|
userIds: {
|
package/models/Settings.js
CHANGED
|
@@ -14,6 +14,10 @@ const mongoose = require('mongoose');
|
|
|
14
14
|
* type: number
|
|
15
15
|
* default: 20
|
|
16
16
|
* description: Maximum pollution threshold for notification system (notifications per day)
|
|
17
|
+
* max_targeted_users:
|
|
18
|
+
* type: number
|
|
19
|
+
* default: 15
|
|
20
|
+
* description: Maximum number of targeted users for system operations
|
|
17
21
|
* createdAt:
|
|
18
22
|
* type: string
|
|
19
23
|
* format: date-time
|
|
@@ -23,6 +27,7 @@ const mongoose = require('mongoose');
|
|
|
23
27
|
* example:
|
|
24
28
|
* id: "507f1f77bcf86cd799439011"
|
|
25
29
|
* max_pollution_threshold: 20
|
|
30
|
+
* max_targeted_users: 15
|
|
26
31
|
* createdAt: "2025-11-01T10:30:00.000Z"
|
|
27
32
|
* updatedAt: "2025-12-01T15:45:00.000Z"
|
|
28
33
|
*/
|
|
@@ -32,6 +37,10 @@ const SettingsSchema = new mongoose.Schema(
|
|
|
32
37
|
type: Number,
|
|
33
38
|
default: 20,
|
|
34
39
|
},
|
|
40
|
+
max_targeted_users: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 15,
|
|
43
|
+
},
|
|
35
44
|
},
|
|
36
45
|
{
|
|
37
46
|
timestamps: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "database-connector",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "MongoDB models package with Mongoose schemas for e-commerce applications. Includes User, Product, Store, Order and more with built-in validation and virtual properties.",
|
|
5
5
|
"main": "models/index.js",
|
|
6
6
|
"scripts": {
|