@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/models/init-models.ts
CHANGED
|
@@ -185,6 +185,8 @@ import { UserAffinity as _UserAffinity } from "./UserAffinity";
|
|
|
185
185
|
import type { UserAffinityAttributes, UserAffinityCreationAttributes } from "./UserAffinity";
|
|
186
186
|
import { UserArtistAffinity as _UserArtistAffinity } from "./UserArtistAffinity";
|
|
187
187
|
import type { UserArtistAffinityAttributes, UserArtistAffinityCreationAttributes } from "./UserArtistAffinity";
|
|
188
|
+
import { UserBookmarks as _UserBookmarks } from "./UserBookmarks";
|
|
189
|
+
import type { UserBookmarksAttributes, UserBookmarksCreationAttributes } from "./UserBookmarks";
|
|
188
190
|
import { UserComments as _UserComments } from "./UserComments";
|
|
189
191
|
import type { UserCommentsAttributes, UserCommentsCreationAttributes } from "./UserComments";
|
|
190
192
|
import { UserContacts as _UserContacts } from "./UserContacts";
|
|
@@ -290,6 +292,7 @@ export {
|
|
|
290
292
|
_UnmatchedArtist as UnmatchedArtist,
|
|
291
293
|
_UserAffinity as UserAffinity,
|
|
292
294
|
_UserArtistAffinity as UserArtistAffinity,
|
|
295
|
+
_UserBookmarks as UserBookmarks,
|
|
293
296
|
_UserComments as UserComments,
|
|
294
297
|
_UserContacts as UserContacts,
|
|
295
298
|
_UserEngagementFactor as UserEngagementFactor,
|
|
@@ -484,6 +487,8 @@ export type {
|
|
|
484
487
|
UserAffinityCreationAttributes,
|
|
485
488
|
UserArtistAffinityAttributes,
|
|
486
489
|
UserArtistAffinityCreationAttributes,
|
|
490
|
+
UserBookmarksAttributes,
|
|
491
|
+
UserBookmarksCreationAttributes,
|
|
487
492
|
UserCommentsAttributes,
|
|
488
493
|
UserCommentsCreationAttributes,
|
|
489
494
|
UserContactsAttributes,
|
|
@@ -590,6 +595,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
590
595
|
const UnmatchedArtist = _UnmatchedArtist.initModel(sequelize);
|
|
591
596
|
const UserAffinity = _UserAffinity.initModel(sequelize);
|
|
592
597
|
const UserArtistAffinity = _UserArtistAffinity.initModel(sequelize);
|
|
598
|
+
const UserBookmarks = _UserBookmarks.initModel(sequelize);
|
|
593
599
|
const UserComments = _UserComments.initModel(sequelize);
|
|
594
600
|
const UserContacts = _UserContacts.initModel(sequelize);
|
|
595
601
|
const UserEngagementFactor = _UserEngagementFactor.initModel(sequelize);
|
|
@@ -680,12 +686,12 @@ export function initModels(sequelize: Sequelize) {
|
|
|
680
686
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId"});
|
|
681
687
|
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId"});
|
|
682
688
|
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId"});
|
|
683
|
-
RadioShowMedia.belongsTo(AppUser, { as: "manualModerationByUser", foreignKey: "manualModerationByUserId"});
|
|
684
|
-
AppUser.hasMany(RadioShowMedia, { as: "radioShowMedia", foreignKey: "manualModerationByUserId"});
|
|
685
689
|
UserAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId"});
|
|
686
690
|
AppUser.hasMany(UserAffinity, { as: "userAffinities", foreignKey: "userId"});
|
|
687
691
|
UserArtistAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId"});
|
|
688
692
|
AppUser.hasMany(UserArtistAffinity, { as: "userArtistAffinities", foreignKey: "userId"});
|
|
693
|
+
UserBookmarks.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
694
|
+
AppUser.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "appUserId"});
|
|
689
695
|
UserComments.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
690
696
|
AppUser.hasMany(UserComments, { as: "userComments", foreignKey: "appUserId"});
|
|
691
697
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
@@ -796,6 +802,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
796
802
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId"});
|
|
797
803
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId"});
|
|
798
804
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId"});
|
|
805
|
+
UserBookmarks.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
806
|
+
JukeboxSession.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "jukeboxId"});
|
|
799
807
|
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
800
808
|
JukeboxSession.hasMany(UserComments, { as: "userComments", foreignKey: "jukeboxId"});
|
|
801
809
|
UserLikes.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
@@ -808,6 +816,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
808
816
|
JukeboxType.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "typeId"});
|
|
809
817
|
JukeboxUser.belongsTo(JukeboxUserType, { as: "jukeboxUserType", foreignKey: "jukeboxUserTypeId"});
|
|
810
818
|
JukeboxUserType.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxUserTypeId"});
|
|
819
|
+
UserBookmarks.belongsTo(MerchItem, { as: "merchItem", foreignKey: "merchItemId"});
|
|
820
|
+
MerchItem.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "merchItemId"});
|
|
811
821
|
MerchItem.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId"});
|
|
812
822
|
MerchPlatform.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchPlatformId"});
|
|
813
823
|
MerchOrchestration.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId"});
|
|
@@ -816,6 +826,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
816
826
|
MerchType.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchTypeId"});
|
|
817
827
|
MerchOrchestration.belongsTo(MerchType, { as: "merchType", foreignKey: "merchTypeId"});
|
|
818
828
|
MerchType.hasMany(MerchOrchestration, { as: "merchOrchestrations", foreignKey: "merchTypeId"});
|
|
829
|
+
UserBookmarks.belongsTo(NewsArticle, { as: "newsArticle", foreignKey: "newsArticleId"});
|
|
830
|
+
NewsArticle.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "newsArticleId"});
|
|
819
831
|
NewsArticle.belongsTo(NewsPlatform, { as: "newsPlatform", foreignKey: "newsPlatformId"});
|
|
820
832
|
NewsPlatform.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "newsPlatformId"});
|
|
821
833
|
Notification.belongsTo(NotificationType, { as: "notificationType", foreignKey: "notificationTypeId"});
|
|
@@ -902,6 +914,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
902
914
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId"});
|
|
903
915
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId"});
|
|
904
916
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId"});
|
|
917
|
+
UserBookmarks.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
918
|
+
PlatformUserPlaylist.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "playlistId"});
|
|
905
919
|
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
906
920
|
PlatformUserPlaylist.hasMany(UserComments, { as: "userComments", foreignKey: "playlistId"});
|
|
907
921
|
UserLikes.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
@@ -916,6 +930,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
916
930
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId"});
|
|
917
931
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
918
932
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId"});
|
|
933
|
+
UserBookmarks.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
934
|
+
RadioShow.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "radioShowId"});
|
|
919
935
|
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
920
936
|
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId"});
|
|
921
937
|
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
@@ -1025,6 +1041,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
1025
1041
|
UnmatchedArtist: UnmatchedArtist,
|
|
1026
1042
|
UserAffinity: UserAffinity,
|
|
1027
1043
|
UserArtistAffinity: UserArtistAffinity,
|
|
1044
|
+
UserBookmarks: UserBookmarks,
|
|
1028
1045
|
UserComments: UserComments,
|
|
1029
1046
|
UserContacts: UserContacts,
|
|
1030
1047
|
UserEngagementFactor: UserEngagementFactor,
|