agrs-sequelize-sdk 1.3.24 → 1.3.27
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/RSOCFeedCampaign.js +14 -0
- package/package.json +1 -1
|
@@ -170,6 +170,11 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
170
170
|
allowNull: true,
|
|
171
171
|
comment: "Language code for the campaign",
|
|
172
172
|
},
|
|
173
|
+
feed_id: {
|
|
174
|
+
type: DataTypes.UUID,
|
|
175
|
+
allowNull: true,
|
|
176
|
+
comment: "ID referencing DynamicFeed.id for dynamic feeds",
|
|
177
|
+
},
|
|
173
178
|
},
|
|
174
179
|
{
|
|
175
180
|
tableName: "rsoc_feed_campaigns",
|
|
@@ -196,6 +201,15 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
196
201
|
constraints: false,
|
|
197
202
|
});
|
|
198
203
|
}
|
|
204
|
+
|
|
205
|
+
if (models.DynamicFeed) {
|
|
206
|
+
RSOCFeedCampaign.belongsTo(models.DynamicFeed, {
|
|
207
|
+
foreignKey: "feed_id",
|
|
208
|
+
targetKey: "id",
|
|
209
|
+
as: "DynamicFeed",
|
|
210
|
+
constraints: false,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
199
213
|
};
|
|
200
214
|
|
|
201
215
|
// BeforeCreate hook: Update Channel status and connectedCampaigns
|