@earbug/db-models 0.0.34 → 0.0.36
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/dist/AppUser.d.ts +12 -12
- package/dist/JukeboxSession.d.ts +12 -0
- package/dist/MerchItem.d.ts +12 -0
- package/dist/NewsArticle.d.ts +12 -0
- package/dist/PlatformUserPlaylist.d.ts +12 -0
- package/dist/RadioShow.d.ts +12 -0
- package/dist/RadioShowMedia.d.ts +3 -8
- package/dist/RadioShowMedia.js +3 -7
- package/dist/UserBookmarks.d.ts +59 -0
- package/dist/UserBookmarks.js +197 -0
- package/dist/UserComments.d.ts +9 -1
- package/dist/UserComments.js +20 -0
- package/dist/init-models.d.ts +5 -2
- package/dist/init-models.js +17 -3
- package/models/AppUser.ts +13 -13
- package/models/JukeboxSession.ts +13 -0
- package/models/MerchItem.ts +13 -0
- package/models/NewsArticle.ts +13 -0
- package/models/PlatformUserPlaylist.ts +13 -0
- package/models/RadioShow.ts +13 -0
- package/models/RadioShowMedia.ts +6 -16
- package/models/UserBookmarks.ts +235 -0
- package/models/UserComments.ts +29 -1
- package/models/init-models.ts +19 -2
- package/package.json +1 -1
package/dist/init-models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KnexMigrations = exports.JukeboxUserType = exports.JukeboxUser = exports.JukeboxType = exports.JukeboxTerminationCondition = exports.JukeboxStatus = exports.JukeboxSessionGenreAffinity = exports.JukeboxSessionArtistAffinity = exports.JukeboxSession = exports.JukeboxQueueMode = exports.JukeboxQueueEntry = exports.JukeboxInvite = exports.JukeboxCanonGenreRelation = exports.JukeboxAccessType = exports.GuestUser = exports.FeedContentType = exports.FeedConfig = exports.ExternalReference = exports.ConfigParam = exports.CanonTrack = exports.CanonToPlatformTrackRelation = exports.CanonToPlatformGenreRelation = exports.CanonToPlatformArtistRelation = exports.CanonToPlatformAlbumRelation = exports.CanonMemberExternalReferenceRelation = exports.CanonMember = exports.CanonLabelExternalReferenceRelation = exports.CanonLabel = exports.CanonGenreExternalReferenceRelation = exports.CanonGenre = exports.CanonArtistTrackRelation = exports.CanonArtistMemberRelation = exports.CanonArtistImageHarvested = exports.CanonArtistGenreRelation = exports.CanonArtistExternalReferenceRelation = exports.CanonArtistAlbumRelation = exports.CanonArtist = exports.CanonAlbumTrackRelation = exports.CanonAlbumLabelRelation = exports.CanonAlbumImageHarvested = exports.CanonAlbumGenreRelation = exports.CanonAlbumExternalReferenceRelation = exports.CanonAlbum = exports.AppUserPlatformRelation = exports.AppUserFollowRelation = exports.AppUserDevice = exports.AppUser = exports.AffinityTier = exports.AffinityRelationshipType = exports.AccessControlPreference = void 0;
|
|
4
|
-
exports.UserLikes = exports.UserGenreAffinity = exports.UserEngagementFactor = exports.UserContacts = exports.UserComments = exports.UserArtistAffinity = exports.UserAffinity = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = exports.RadioShowPublishRequests = exports.RadioShowPlacement = exports.RadioShowMedia = exports.RadioShowGenres = exports.RadioShow = exports.PlaybackStatusType = exports.PlaybackStatus = exports.PlatformUserPlaylistTrack = exports.PlatformUserPlaylistGenreAffinity = exports.PlatformUserPlaylistArtistAffinity = exports.PlatformUserPlaylist = exports.PlatformUserAlbumTrack = exports.PlatformUserAlbum = exports.PlatformTrackGenreRelation = exports.PlatformTrack = exports.PlatformGenre = exports.PlatformArtistTrackRelation = exports.PlatformArtistGenreRelation = exports.PlatformArtistAlbumRelation = exports.PlatformArtist = exports.PlatformAlbumTrackRelation = exports.PlatformAlbumGenreRelation = exports.PlatformAlbum = exports.Platform = exports.PauseStatusType = exports.NotificationType = exports.Notification = exports.NewsSite = exports.NewsPlatform = exports.NewsArticle = exports.MetricsEvent = exports.MetricsDaily = exports.MerchType = exports.MerchPlatform = exports.MerchOrchestration = exports.MerchItem = exports.KnexMigrationsLock = void 0;
|
|
4
|
+
exports.UserLikes = exports.UserGenreAffinity = exports.UserEngagementFactor = exports.UserContacts = exports.UserComments = exports.UserBookmarks = exports.UserArtistAffinity = exports.UserAffinity = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = exports.RadioShowPublishRequests = exports.RadioShowPlacement = exports.RadioShowMedia = exports.RadioShowGenres = exports.RadioShow = exports.PlaybackStatusType = exports.PlaybackStatus = exports.PlatformUserPlaylistTrack = exports.PlatformUserPlaylistGenreAffinity = exports.PlatformUserPlaylistArtistAffinity = exports.PlatformUserPlaylist = exports.PlatformUserAlbumTrack = exports.PlatformUserAlbum = exports.PlatformTrackGenreRelation = exports.PlatformTrack = exports.PlatformGenre = exports.PlatformArtistTrackRelation = exports.PlatformArtistGenreRelation = exports.PlatformArtistAlbumRelation = exports.PlatformArtist = exports.PlatformAlbumTrackRelation = exports.PlatformAlbumGenreRelation = exports.PlatformAlbum = exports.Platform = exports.PauseStatusType = exports.NotificationType = exports.Notification = exports.NewsSite = exports.NewsPlatform = exports.NewsArticle = exports.MetricsEvent = exports.MetricsDaily = exports.MerchType = exports.MerchPlatform = exports.MerchOrchestration = exports.MerchItem = exports.KnexMigrationsLock = void 0;
|
|
5
5
|
exports.initModels = initModels;
|
|
6
6
|
const AccessControlPreference_1 = require("./AccessControlPreference");
|
|
7
7
|
Object.defineProperty(exports, "AccessControlPreference", { enumerable: true, get: function () { return AccessControlPreference_1.AccessControlPreference; } });
|
|
@@ -189,6 +189,8 @@ const UserAffinity_1 = require("./UserAffinity");
|
|
|
189
189
|
Object.defineProperty(exports, "UserAffinity", { enumerable: true, get: function () { return UserAffinity_1.UserAffinity; } });
|
|
190
190
|
const UserArtistAffinity_1 = require("./UserArtistAffinity");
|
|
191
191
|
Object.defineProperty(exports, "UserArtistAffinity", { enumerable: true, get: function () { return UserArtistAffinity_1.UserArtistAffinity; } });
|
|
192
|
+
const UserBookmarks_1 = require("./UserBookmarks");
|
|
193
|
+
Object.defineProperty(exports, "UserBookmarks", { enumerable: true, get: function () { return UserBookmarks_1.UserBookmarks; } });
|
|
192
194
|
const UserComments_1 = require("./UserComments");
|
|
193
195
|
Object.defineProperty(exports, "UserComments", { enumerable: true, get: function () { return UserComments_1.UserComments; } });
|
|
194
196
|
const UserContacts_1 = require("./UserContacts");
|
|
@@ -293,6 +295,7 @@ function initModels(sequelize) {
|
|
|
293
295
|
const UnmatchedArtist = UnmatchedArtist_1.UnmatchedArtist.initModel(sequelize);
|
|
294
296
|
const UserAffinity = UserAffinity_1.UserAffinity.initModel(sequelize);
|
|
295
297
|
const UserArtistAffinity = UserArtistAffinity_1.UserArtistAffinity.initModel(sequelize);
|
|
298
|
+
const UserBookmarks = UserBookmarks_1.UserBookmarks.initModel(sequelize);
|
|
296
299
|
const UserComments = UserComments_1.UserComments.initModel(sequelize);
|
|
297
300
|
const UserContacts = UserContacts_1.UserContacts.initModel(sequelize);
|
|
298
301
|
const UserEngagementFactor = UserEngagementFactor_1.UserEngagementFactor.initModel(sequelize);
|
|
@@ -382,12 +385,12 @@ function initModels(sequelize) {
|
|
|
382
385
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId" });
|
|
383
386
|
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId" });
|
|
384
387
|
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId" });
|
|
385
|
-
RadioShowMedia.belongsTo(AppUser, { as: "manualModerationByUser", foreignKey: "manualModerationByUserId" });
|
|
386
|
-
AppUser.hasMany(RadioShowMedia, { as: "radioShowMedia", foreignKey: "manualModerationByUserId" });
|
|
387
388
|
UserAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId" });
|
|
388
389
|
AppUser.hasMany(UserAffinity, { as: "userAffinities", foreignKey: "userId" });
|
|
389
390
|
UserArtistAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId" });
|
|
390
391
|
AppUser.hasMany(UserArtistAffinity, { as: "userArtistAffinities", foreignKey: "userId" });
|
|
392
|
+
UserBookmarks.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
393
|
+
AppUser.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "appUserId" });
|
|
391
394
|
UserComments.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
392
395
|
AppUser.hasMany(UserComments, { as: "userComments", foreignKey: "appUserId" });
|
|
393
396
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
@@ -498,6 +501,8 @@ function initModels(sequelize) {
|
|
|
498
501
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId" });
|
|
499
502
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId" });
|
|
500
503
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId" });
|
|
504
|
+
UserBookmarks.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
505
|
+
JukeboxSession.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "jukeboxId" });
|
|
501
506
|
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
502
507
|
JukeboxSession.hasMany(UserComments, { as: "userComments", foreignKey: "jukeboxId" });
|
|
503
508
|
UserLikes.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
@@ -510,6 +515,8 @@ function initModels(sequelize) {
|
|
|
510
515
|
JukeboxType.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "typeId" });
|
|
511
516
|
JukeboxUser.belongsTo(JukeboxUserType, { as: "jukeboxUserType", foreignKey: "jukeboxUserTypeId" });
|
|
512
517
|
JukeboxUserType.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxUserTypeId" });
|
|
518
|
+
UserBookmarks.belongsTo(MerchItem, { as: "merchItem", foreignKey: "merchItemId" });
|
|
519
|
+
MerchItem.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "merchItemId" });
|
|
513
520
|
MerchItem.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId" });
|
|
514
521
|
MerchPlatform.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchPlatformId" });
|
|
515
522
|
MerchOrchestration.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId" });
|
|
@@ -518,6 +525,8 @@ function initModels(sequelize) {
|
|
|
518
525
|
MerchType.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchTypeId" });
|
|
519
526
|
MerchOrchestration.belongsTo(MerchType, { as: "merchType", foreignKey: "merchTypeId" });
|
|
520
527
|
MerchType.hasMany(MerchOrchestration, { as: "merchOrchestrations", foreignKey: "merchTypeId" });
|
|
528
|
+
UserBookmarks.belongsTo(NewsArticle, { as: "newsArticle", foreignKey: "newsArticleId" });
|
|
529
|
+
NewsArticle.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "newsArticleId" });
|
|
521
530
|
NewsArticle.belongsTo(NewsPlatform, { as: "newsPlatform", foreignKey: "newsPlatformId" });
|
|
522
531
|
NewsPlatform.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "newsPlatformId" });
|
|
523
532
|
Notification.belongsTo(NotificationType, { as: "notificationType", foreignKey: "notificationTypeId" });
|
|
@@ -604,6 +613,8 @@ function initModels(sequelize) {
|
|
|
604
613
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId" });
|
|
605
614
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
606
615
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
616
|
+
UserBookmarks.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
617
|
+
PlatformUserPlaylist.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "playlistId" });
|
|
607
618
|
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
608
619
|
PlatformUserPlaylist.hasMany(UserComments, { as: "userComments", foreignKey: "playlistId" });
|
|
609
620
|
UserLikes.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
@@ -618,6 +629,8 @@ function initModels(sequelize) {
|
|
|
618
629
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId" });
|
|
619
630
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
620
631
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId" });
|
|
632
|
+
UserBookmarks.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
633
|
+
RadioShow.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "radioShowId" });
|
|
621
634
|
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
622
635
|
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId" });
|
|
623
636
|
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
@@ -726,6 +739,7 @@ function initModels(sequelize) {
|
|
|
726
739
|
UnmatchedArtist: UnmatchedArtist,
|
|
727
740
|
UserAffinity: UserAffinity,
|
|
728
741
|
UserArtistAffinity: UserArtistAffinity,
|
|
742
|
+
UserBookmarks: UserBookmarks,
|
|
729
743
|
UserComments: UserComments,
|
|
730
744
|
UserContacts: UserContacts,
|
|
731
745
|
UserEngagementFactor: UserEngagementFactor,
|
package/models/AppUser.ts
CHANGED
|
@@ -10,10 +10,10 @@ import type { Notification, NotificationId } from './Notification';
|
|
|
10
10
|
import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
|
|
11
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
12
12
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
13
|
-
import type { RadioShowMedia, RadioShowMediaId } from './RadioShowMedia';
|
|
14
13
|
import type { State, StateId } from './State';
|
|
15
14
|
import type { UserAffinity, UserAffinityId } from './UserAffinity';
|
|
16
15
|
import type { UserArtistAffinity, UserArtistAffinityId } from './UserArtistAffinity';
|
|
16
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
17
17
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
18
18
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
19
19
|
import type { UserEngagementFactor, UserEngagementFactorId } from './UserEngagementFactor';
|
|
@@ -203,18 +203,6 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
203
203
|
hasRadioShow!: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
|
|
204
204
|
hasRadioShows!: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
|
|
205
205
|
countRadioShows!: Sequelize.HasManyCountAssociationsMixin;
|
|
206
|
-
// AppUser hasMany RadioShowMedia via manualModerationByUserId
|
|
207
|
-
radioShowMedia!: RadioShowMedia[];
|
|
208
|
-
getRadioShowMedia!: Sequelize.HasManyGetAssociationsMixin<RadioShowMedia>;
|
|
209
|
-
setRadioShowMedia!: Sequelize.HasManySetAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
|
|
210
|
-
addRadioShowMedium!: Sequelize.HasManyAddAssociationMixin<RadioShowMedia, RadioShowMediaId>;
|
|
211
|
-
addRadioShowMedia!: Sequelize.HasManyAddAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
|
|
212
|
-
createRadioShowMedium!: Sequelize.HasManyCreateAssociationMixin<RadioShowMedia>;
|
|
213
|
-
removeRadioShowMedium!: Sequelize.HasManyRemoveAssociationMixin<RadioShowMedia, RadioShowMediaId>;
|
|
214
|
-
removeRadioShowMedia!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
|
|
215
|
-
hasRadioShowMedium!: Sequelize.HasManyHasAssociationMixin<RadioShowMedia, RadioShowMediaId>;
|
|
216
|
-
hasRadioShowMedia!: Sequelize.HasManyHasAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
|
|
217
|
-
countRadioShowMedia!: Sequelize.HasManyCountAssociationsMixin;
|
|
218
206
|
// AppUser hasMany UserAffinity via userId
|
|
219
207
|
userAffinities!: UserAffinity[];
|
|
220
208
|
getUserAffinities!: Sequelize.HasManyGetAssociationsMixin<UserAffinity>;
|
|
@@ -239,6 +227,18 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
239
227
|
hasUserArtistAffinity!: Sequelize.HasManyHasAssociationMixin<UserArtistAffinity, UserArtistAffinityId>;
|
|
240
228
|
hasUserArtistAffinities!: Sequelize.HasManyHasAssociationsMixin<UserArtistAffinity, UserArtistAffinityId>;
|
|
241
229
|
countUserArtistAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
230
|
+
// AppUser hasMany UserBookmarks via appUserId
|
|
231
|
+
userBookmarks!: UserBookmarks[];
|
|
232
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
233
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
234
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
235
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
236
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
237
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
238
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
239
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
240
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
241
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
242
242
|
// AppUser hasMany UserComments via appUserId
|
|
243
243
|
userComments!: UserComments[];
|
|
244
244
|
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
package/models/JukeboxSession.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type { JukeboxTerminationCondition, JukeboxTerminationConditionId } from
|
|
|
13
13
|
import type { JukeboxType, JukeboxTypeId } from './JukeboxType';
|
|
14
14
|
import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
|
|
15
15
|
import type { Notification, NotificationId } from './Notification';
|
|
16
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
16
17
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
17
18
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
18
19
|
|
|
@@ -156,6 +157,18 @@ export class JukeboxSession extends Model<JukeboxSessionAttributes, JukeboxSessi
|
|
|
156
157
|
hasNotification!: Sequelize.HasManyHasAssociationMixin<Notification, NotificationId>;
|
|
157
158
|
hasNotifications!: Sequelize.HasManyHasAssociationsMixin<Notification, NotificationId>;
|
|
158
159
|
countNotifications!: Sequelize.HasManyCountAssociationsMixin;
|
|
160
|
+
// JukeboxSession hasMany UserBookmarks via jukeboxId
|
|
161
|
+
userBookmarks!: UserBookmarks[];
|
|
162
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
163
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
164
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
165
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
166
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
167
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
168
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
169
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
170
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
171
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
159
172
|
// JukeboxSession hasMany UserComments via jukeboxId
|
|
160
173
|
userComments!: UserComments[];
|
|
161
174
|
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
package/models/MerchItem.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DataTypes, Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
4
|
import type { MerchPlatform, MerchPlatformId } from './MerchPlatform';
|
|
5
5
|
import type { MerchType, MerchTypeId } from './MerchType';
|
|
6
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
6
7
|
|
|
7
8
|
export interface MerchItemAttributes {
|
|
8
9
|
canonArtistId: string;
|
|
@@ -43,6 +44,18 @@ export class MerchItem extends Model<MerchItemAttributes, MerchItemCreationAttri
|
|
|
43
44
|
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
44
45
|
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
45
46
|
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
47
|
+
// MerchItem hasMany UserBookmarks via merchItemId
|
|
48
|
+
userBookmarks!: UserBookmarks[];
|
|
49
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
50
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
51
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
52
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
53
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
54
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
55
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
56
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
57
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
58
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
46
59
|
// MerchItem belongsTo MerchPlatform via merchPlatformId
|
|
47
60
|
merchPlatform!: MerchPlatform;
|
|
48
61
|
getMerchPlatform!: Sequelize.BelongsToGetAssociationMixin<MerchPlatform>;
|
package/models/NewsArticle.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
4
|
import type { NewsPlatform, NewsPlatformId } from './NewsPlatform';
|
|
5
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
5
6
|
|
|
6
7
|
export interface NewsArticleAttributes {
|
|
7
8
|
id: string;
|
|
@@ -38,6 +39,18 @@ export class NewsArticle extends Model<NewsArticleAttributes, NewsArticleCreatio
|
|
|
38
39
|
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
39
40
|
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
40
41
|
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
42
|
+
// NewsArticle hasMany UserBookmarks via newsArticleId
|
|
43
|
+
userBookmarks!: UserBookmarks[];
|
|
44
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
45
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
46
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
47
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
48
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
49
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
50
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
51
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
52
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
53
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
41
54
|
// NewsArticle belongsTo NewsPlatform via newsPlatformId
|
|
42
55
|
newsPlatform!: NewsPlatform;
|
|
43
56
|
getNewsPlatform!: Sequelize.BelongsToGetAssociationMixin<NewsPlatform>;
|
|
@@ -6,6 +6,7 @@ import type { PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffi
|
|
|
6
6
|
import type { PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId } from './PlatformUserPlaylistGenreAffinity';
|
|
7
7
|
import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
|
|
8
8
|
import type { State, StateId } from './State';
|
|
9
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
9
10
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
10
11
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
11
12
|
|
|
@@ -91,6 +92,18 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
91
92
|
hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
92
93
|
hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
93
94
|
countPlatformUserPlaylistTracks!: Sequelize.HasManyCountAssociationsMixin;
|
|
95
|
+
// PlatformUserPlaylist hasMany UserBookmarks via playlistId
|
|
96
|
+
userBookmarks!: UserBookmarks[];
|
|
97
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
98
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
99
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
100
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
101
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
102
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
103
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
104
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
105
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
106
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
94
107
|
// PlatformUserPlaylist hasMany UserComments via playlistId
|
|
95
108
|
userComments!: UserComments[];
|
|
96
109
|
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
package/models/RadioShow.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
|
|
|
5
5
|
import type { RadioShowMedia, RadioShowMediaId } from './RadioShowMedia';
|
|
6
6
|
import type { RadioShowPlacement, RadioShowPlacementId } from './RadioShowPlacement';
|
|
7
7
|
import type { RadioShowPublishRequests, RadioShowPublishRequestsId } from './RadioShowPublishRequests';
|
|
8
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
8
9
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
9
10
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
10
11
|
|
|
@@ -87,6 +88,18 @@ export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttri
|
|
|
87
88
|
hasRadioShowPublishRequest!: Sequelize.HasManyHasAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
|
|
88
89
|
hasRadioShowPublishRequests!: Sequelize.HasManyHasAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
|
|
89
90
|
countRadioShowPublishRequests!: Sequelize.HasManyCountAssociationsMixin;
|
|
91
|
+
// RadioShow hasMany UserBookmarks via radioShowId
|
|
92
|
+
userBookmarks!: UserBookmarks[];
|
|
93
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
94
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
95
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
96
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
97
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
98
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
99
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
100
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
101
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
102
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
90
103
|
// RadioShow hasMany UserComments via radioShowId
|
|
91
104
|
userComments!: UserComments[];
|
|
92
105
|
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
package/models/RadioShowMedia.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
3
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
5
4
|
|
|
6
5
|
export interface RadioShowMediaAttributes {
|
|
@@ -20,12 +19,12 @@ export interface RadioShowMediaAttributes {
|
|
|
20
19
|
automatedModerationDecidedAt?: Date;
|
|
21
20
|
manualModerationApproved?: boolean;
|
|
22
21
|
manualModerationDecidedAt?: Date;
|
|
23
|
-
|
|
22
|
+
manualModerationBy?: string;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export type RadioShowMediaPk = "id";
|
|
27
26
|
export type RadioShowMediaId = RadioShowMedia[RadioShowMediaPk];
|
|
28
|
-
export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "id" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded" | "automatedModerationApproved" | "automatedModerationRejectionMetadata" | "automatedModerationDecidedAt" | "manualModerationApproved" | "manualModerationDecidedAt" | "
|
|
27
|
+
export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "id" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded" | "automatedModerationApproved" | "automatedModerationRejectionMetadata" | "automatedModerationDecidedAt" | "manualModerationApproved" | "manualModerationDecidedAt" | "manualModerationBy";
|
|
29
28
|
export type RadioShowMediaCreationAttributes = Optional<RadioShowMediaAttributes, RadioShowMediaOptionalAttributes>;
|
|
30
29
|
|
|
31
30
|
export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMediaCreationAttributes> implements RadioShowMediaAttributes {
|
|
@@ -45,13 +44,8 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
|
|
|
45
44
|
automatedModerationDecidedAt?: Date;
|
|
46
45
|
manualModerationApproved?: boolean;
|
|
47
46
|
manualModerationDecidedAt?: Date;
|
|
48
|
-
|
|
47
|
+
manualModerationBy?: string;
|
|
49
48
|
|
|
50
|
-
// RadioShowMedia belongsTo AppUser via manualModerationByUserId
|
|
51
|
-
manualModerationByUser!: AppUser;
|
|
52
|
-
getManualModerationByUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
53
|
-
setManualModerationByUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
54
|
-
createManualModerationByUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
55
49
|
// RadioShowMedia belongsTo RadioShow via radioShowId
|
|
56
50
|
radioShow!: RadioShow;
|
|
57
51
|
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
@@ -144,14 +138,10 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
|
|
|
144
138
|
allowNull: true,
|
|
145
139
|
field: 'manual_moderation_decided_at'
|
|
146
140
|
},
|
|
147
|
-
|
|
148
|
-
type: DataTypes.
|
|
141
|
+
manualModerationBy: {
|
|
142
|
+
type: DataTypes.TEXT,
|
|
149
143
|
allowNull: true,
|
|
150
|
-
|
|
151
|
-
model: 'app_user',
|
|
152
|
-
key: 'id'
|
|
153
|
-
},
|
|
154
|
-
field: 'manual_moderation_by_user_id'
|
|
144
|
+
field: 'manual_moderation_by'
|
|
155
145
|
}
|
|
156
146
|
}, {
|
|
157
147
|
sequelize,
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
5
|
+
import type { MerchItem, MerchItemId } from './MerchItem';
|
|
6
|
+
import type { NewsArticle, NewsArticleId } from './NewsArticle';
|
|
7
|
+
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
8
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
9
|
+
|
|
10
|
+
export interface UserBookmarksAttributes {
|
|
11
|
+
appUserId: string;
|
|
12
|
+
jukeboxId?: string;
|
|
13
|
+
playlistId?: string;
|
|
14
|
+
radioShowId?: string;
|
|
15
|
+
merchItemId?: string;
|
|
16
|
+
newsArticleId?: string;
|
|
17
|
+
id: string;
|
|
18
|
+
createDate: Date;
|
|
19
|
+
updateDate: Date;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type UserBookmarksPk = "id";
|
|
23
|
+
export type UserBookmarksId = UserBookmarks[UserBookmarksPk];
|
|
24
|
+
export type UserBookmarksOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "merchItemId" | "newsArticleId" | "id" | "createDate" | "updateDate";
|
|
25
|
+
export type UserBookmarksCreationAttributes = Optional<UserBookmarksAttributes, UserBookmarksOptionalAttributes>;
|
|
26
|
+
|
|
27
|
+
export class UserBookmarks extends Model<UserBookmarksAttributes, UserBookmarksCreationAttributes> implements UserBookmarksAttributes {
|
|
28
|
+
appUserId!: string;
|
|
29
|
+
jukeboxId?: string;
|
|
30
|
+
playlistId?: string;
|
|
31
|
+
radioShowId?: string;
|
|
32
|
+
merchItemId?: string;
|
|
33
|
+
newsArticleId?: string;
|
|
34
|
+
id!: string;
|
|
35
|
+
createDate!: Date;
|
|
36
|
+
updateDate!: Date;
|
|
37
|
+
|
|
38
|
+
// UserBookmarks belongsTo AppUser via appUserId
|
|
39
|
+
appUser!: AppUser;
|
|
40
|
+
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
41
|
+
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
42
|
+
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
43
|
+
// UserBookmarks belongsTo JukeboxSession via jukeboxId
|
|
44
|
+
jukebox!: JukeboxSession;
|
|
45
|
+
getJukebox!: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
46
|
+
setJukebox!: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
47
|
+
createJukebox!: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
48
|
+
// UserBookmarks belongsTo MerchItem via merchItemId
|
|
49
|
+
merchItem!: MerchItem;
|
|
50
|
+
getMerchItem!: Sequelize.BelongsToGetAssociationMixin<MerchItem>;
|
|
51
|
+
setMerchItem!: Sequelize.BelongsToSetAssociationMixin<MerchItem, MerchItemId>;
|
|
52
|
+
createMerchItem!: Sequelize.BelongsToCreateAssociationMixin<MerchItem>;
|
|
53
|
+
// UserBookmarks belongsTo NewsArticle via newsArticleId
|
|
54
|
+
newsArticle!: NewsArticle;
|
|
55
|
+
getNewsArticle!: Sequelize.BelongsToGetAssociationMixin<NewsArticle>;
|
|
56
|
+
setNewsArticle!: Sequelize.BelongsToSetAssociationMixin<NewsArticle, NewsArticleId>;
|
|
57
|
+
createNewsArticle!: Sequelize.BelongsToCreateAssociationMixin<NewsArticle>;
|
|
58
|
+
// UserBookmarks belongsTo PlatformUserPlaylist via playlistId
|
|
59
|
+
playlist!: PlatformUserPlaylist;
|
|
60
|
+
getPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
61
|
+
setPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
62
|
+
createPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
63
|
+
// UserBookmarks belongsTo RadioShow via radioShowId
|
|
64
|
+
radioShow!: RadioShow;
|
|
65
|
+
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
66
|
+
setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
67
|
+
createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
68
|
+
|
|
69
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserBookmarks {
|
|
70
|
+
return UserBookmarks.init({
|
|
71
|
+
appUserId: {
|
|
72
|
+
type: DataTypes.UUID,
|
|
73
|
+
allowNull: false,
|
|
74
|
+
references: {
|
|
75
|
+
model: 'app_user',
|
|
76
|
+
key: 'id'
|
|
77
|
+
},
|
|
78
|
+
field: 'app_user_id'
|
|
79
|
+
},
|
|
80
|
+
jukeboxId: {
|
|
81
|
+
type: DataTypes.UUID,
|
|
82
|
+
allowNull: true,
|
|
83
|
+
references: {
|
|
84
|
+
model: 'jukebox_session',
|
|
85
|
+
key: 'id'
|
|
86
|
+
},
|
|
87
|
+
field: 'jukebox_id'
|
|
88
|
+
},
|
|
89
|
+
playlistId: {
|
|
90
|
+
type: DataTypes.UUID,
|
|
91
|
+
allowNull: true,
|
|
92
|
+
references: {
|
|
93
|
+
model: 'platform_user_playlist',
|
|
94
|
+
key: 'id'
|
|
95
|
+
},
|
|
96
|
+
field: 'playlist_id'
|
|
97
|
+
},
|
|
98
|
+
radioShowId: {
|
|
99
|
+
type: DataTypes.UUID,
|
|
100
|
+
allowNull: true,
|
|
101
|
+
references: {
|
|
102
|
+
model: 'radio_show',
|
|
103
|
+
key: 'id'
|
|
104
|
+
},
|
|
105
|
+
field: 'radio_show_id'
|
|
106
|
+
},
|
|
107
|
+
merchItemId: {
|
|
108
|
+
type: DataTypes.UUID,
|
|
109
|
+
allowNull: true,
|
|
110
|
+
references: {
|
|
111
|
+
model: 'merch_item',
|
|
112
|
+
key: 'id'
|
|
113
|
+
},
|
|
114
|
+
field: 'merch_item_id'
|
|
115
|
+
},
|
|
116
|
+
newsArticleId: {
|
|
117
|
+
type: DataTypes.UUID,
|
|
118
|
+
allowNull: true,
|
|
119
|
+
references: {
|
|
120
|
+
model: 'news_article',
|
|
121
|
+
key: 'id'
|
|
122
|
+
},
|
|
123
|
+
field: 'news_article_id'
|
|
124
|
+
},
|
|
125
|
+
id: {
|
|
126
|
+
type: DataTypes.UUID,
|
|
127
|
+
allowNull: false,
|
|
128
|
+
defaultValue: DataTypes.UUIDV4,
|
|
129
|
+
primaryKey: true
|
|
130
|
+
},
|
|
131
|
+
createDate: {
|
|
132
|
+
type: DataTypes.DATE,
|
|
133
|
+
allowNull: false,
|
|
134
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
135
|
+
field: 'create_date'
|
|
136
|
+
},
|
|
137
|
+
updateDate: {
|
|
138
|
+
type: DataTypes.DATE,
|
|
139
|
+
allowNull: false,
|
|
140
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
141
|
+
field: 'update_date'
|
|
142
|
+
}
|
|
143
|
+
}, {
|
|
144
|
+
sequelize,
|
|
145
|
+
tableName: 'user_bookmarks',
|
|
146
|
+
schema: 'eb',
|
|
147
|
+
timestamps: false,
|
|
148
|
+
indexes: [
|
|
149
|
+
{
|
|
150
|
+
name: "idx_user_bookmarks_jukebox",
|
|
151
|
+
fields: [
|
|
152
|
+
{ name: "jukebox_id" },
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "idx_user_bookmarks_merch_item",
|
|
157
|
+
fields: [
|
|
158
|
+
{ name: "merch_item_id" },
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: "idx_user_bookmarks_news_article",
|
|
163
|
+
fields: [
|
|
164
|
+
{ name: "news_article_id" },
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "idx_user_bookmarks_playlist",
|
|
169
|
+
fields: [
|
|
170
|
+
{ name: "playlist_id" },
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "idx_user_bookmarks_radio_show",
|
|
175
|
+
fields: [
|
|
176
|
+
{ name: "radio_show_id" },
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "idx_user_bookmarks_user",
|
|
181
|
+
fields: [
|
|
182
|
+
{ name: "app_user_id" },
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "uq_user_bookmarks_user_jukebox",
|
|
187
|
+
unique: true,
|
|
188
|
+
fields: [
|
|
189
|
+
{ name: "app_user_id" },
|
|
190
|
+
{ name: "jukebox_id" },
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "uq_user_bookmarks_user_merch_item",
|
|
195
|
+
unique: true,
|
|
196
|
+
fields: [
|
|
197
|
+
{ name: "app_user_id" },
|
|
198
|
+
{ name: "merch_item_id" },
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "uq_user_bookmarks_user_news_article",
|
|
203
|
+
unique: true,
|
|
204
|
+
fields: [
|
|
205
|
+
{ name: "app_user_id" },
|
|
206
|
+
{ name: "news_article_id" },
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "uq_user_bookmarks_user_playlist",
|
|
211
|
+
unique: true,
|
|
212
|
+
fields: [
|
|
213
|
+
{ name: "app_user_id" },
|
|
214
|
+
{ name: "playlist_id" },
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "uq_user_bookmarks_user_radio_show",
|
|
219
|
+
unique: true,
|
|
220
|
+
fields: [
|
|
221
|
+
{ name: "app_user_id" },
|
|
222
|
+
{ name: "radio_show_id" },
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "user_bookmarks_pkey",
|
|
227
|
+
unique: true,
|
|
228
|
+
fields: [
|
|
229
|
+
{ name: "id" },
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
]
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
package/models/UserComments.ts
CHANGED
|
@@ -16,11 +16,15 @@ export interface UserCommentsAttributes {
|
|
|
16
16
|
deleted: boolean;
|
|
17
17
|
createDate: Date;
|
|
18
18
|
updateDate: Date;
|
|
19
|
+
modifiedComment?: string;
|
|
20
|
+
moderationScore?: number;
|
|
21
|
+
moderationLevel?: string;
|
|
22
|
+
strippedUrls?: object;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
export type UserCommentsPk = "id";
|
|
22
26
|
export type UserCommentsId = UserComments[UserCommentsPk];
|
|
23
|
-
export type UserCommentsOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "replyCommentId" | "createDate" | "updateDate";
|
|
27
|
+
export type UserCommentsOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "replyCommentId" | "createDate" | "updateDate" | "modifiedComment" | "moderationScore" | "moderationLevel" | "strippedUrls";
|
|
24
28
|
export type UserCommentsCreationAttributes = Optional<UserCommentsAttributes, UserCommentsOptionalAttributes>;
|
|
25
29
|
|
|
26
30
|
export class UserComments extends Model<UserCommentsAttributes, UserCommentsCreationAttributes> implements UserCommentsAttributes {
|
|
@@ -34,6 +38,10 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
|
|
|
34
38
|
deleted!: boolean;
|
|
35
39
|
createDate!: Date;
|
|
36
40
|
updateDate!: Date;
|
|
41
|
+
modifiedComment?: string;
|
|
42
|
+
moderationScore?: number;
|
|
43
|
+
moderationLevel?: string;
|
|
44
|
+
strippedUrls?: object;
|
|
37
45
|
|
|
38
46
|
// UserComments belongsTo AppUser via appUserId
|
|
39
47
|
appUser!: AppUser;
|
|
@@ -134,6 +142,26 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
|
|
|
134
142
|
allowNull: false,
|
|
135
143
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
136
144
|
field: 'update_date'
|
|
145
|
+
},
|
|
146
|
+
modifiedComment: {
|
|
147
|
+
type: DataTypes.STRING(1000),
|
|
148
|
+
allowNull: true,
|
|
149
|
+
field: 'modified_comment'
|
|
150
|
+
},
|
|
151
|
+
moderationScore: {
|
|
152
|
+
type: DataTypes.DECIMAL,
|
|
153
|
+
allowNull: true,
|
|
154
|
+
field: 'moderation_score'
|
|
155
|
+
},
|
|
156
|
+
moderationLevel: {
|
|
157
|
+
type: DataTypes.STRING(10),
|
|
158
|
+
allowNull: true,
|
|
159
|
+
field: 'moderation_level'
|
|
160
|
+
},
|
|
161
|
+
strippedUrls: {
|
|
162
|
+
type: DataTypes.JSONB,
|
|
163
|
+
allowNull: true,
|
|
164
|
+
field: 'stripped_urls'
|
|
137
165
|
}
|
|
138
166
|
}, {
|
|
139
167
|
sequelize,
|