@earbug/db-models 0.0.33 → 0.0.35
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 -0
- 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 +13 -3
- package/dist/RadioShowMedia.js +30 -4
- package/dist/UserBookmarks.d.ts +59 -0
- package/dist/UserBookmarks.js +197 -0
- package/dist/init-models.d.ts +5 -2
- package/dist/init-models.js +17 -1
- package/models/AppUser.ts +13 -0
- 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 +43 -7
- package/models/UserBookmarks.ts +235 -0
- package/models/init-models.ts +19 -0
- 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);
|
|
@@ -684,6 +690,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
684
690
|
AppUser.hasMany(UserAffinity, { as: "userAffinities", foreignKey: "userId"});
|
|
685
691
|
UserArtistAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId"});
|
|
686
692
|
AppUser.hasMany(UserArtistAffinity, { as: "userArtistAffinities", foreignKey: "userId"});
|
|
693
|
+
UserBookmarks.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
694
|
+
AppUser.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "appUserId"});
|
|
687
695
|
UserComments.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
688
696
|
AppUser.hasMany(UserComments, { as: "userComments", foreignKey: "appUserId"});
|
|
689
697
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
@@ -794,6 +802,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
794
802
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId"});
|
|
795
803
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId"});
|
|
796
804
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId"});
|
|
805
|
+
UserBookmarks.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
806
|
+
JukeboxSession.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "jukeboxId"});
|
|
797
807
|
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
798
808
|
JukeboxSession.hasMany(UserComments, { as: "userComments", foreignKey: "jukeboxId"});
|
|
799
809
|
UserLikes.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
@@ -806,6 +816,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
806
816
|
JukeboxType.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "typeId"});
|
|
807
817
|
JukeboxUser.belongsTo(JukeboxUserType, { as: "jukeboxUserType", foreignKey: "jukeboxUserTypeId"});
|
|
808
818
|
JukeboxUserType.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxUserTypeId"});
|
|
819
|
+
UserBookmarks.belongsTo(MerchItem, { as: "merchItem", foreignKey: "merchItemId"});
|
|
820
|
+
MerchItem.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "merchItemId"});
|
|
809
821
|
MerchItem.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId"});
|
|
810
822
|
MerchPlatform.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchPlatformId"});
|
|
811
823
|
MerchOrchestration.belongsTo(MerchPlatform, { as: "merchPlatform", foreignKey: "merchPlatformId"});
|
|
@@ -814,6 +826,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
814
826
|
MerchType.hasMany(MerchItem, { as: "merchItems", foreignKey: "merchTypeId"});
|
|
815
827
|
MerchOrchestration.belongsTo(MerchType, { as: "merchType", foreignKey: "merchTypeId"});
|
|
816
828
|
MerchType.hasMany(MerchOrchestration, { as: "merchOrchestrations", foreignKey: "merchTypeId"});
|
|
829
|
+
UserBookmarks.belongsTo(NewsArticle, { as: "newsArticle", foreignKey: "newsArticleId"});
|
|
830
|
+
NewsArticle.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "newsArticleId"});
|
|
817
831
|
NewsArticle.belongsTo(NewsPlatform, { as: "newsPlatform", foreignKey: "newsPlatformId"});
|
|
818
832
|
NewsPlatform.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "newsPlatformId"});
|
|
819
833
|
Notification.belongsTo(NotificationType, { as: "notificationType", foreignKey: "notificationTypeId"});
|
|
@@ -900,6 +914,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
900
914
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId"});
|
|
901
915
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId"});
|
|
902
916
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId"});
|
|
917
|
+
UserBookmarks.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
918
|
+
PlatformUserPlaylist.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "playlistId"});
|
|
903
919
|
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
904
920
|
PlatformUserPlaylist.hasMany(UserComments, { as: "userComments", foreignKey: "playlistId"});
|
|
905
921
|
UserLikes.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
@@ -914,6 +930,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
914
930
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId"});
|
|
915
931
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
916
932
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId"});
|
|
933
|
+
UserBookmarks.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
934
|
+
RadioShow.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "radioShowId"});
|
|
917
935
|
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
918
936
|
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId"});
|
|
919
937
|
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
@@ -1023,6 +1041,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
1023
1041
|
UnmatchedArtist: UnmatchedArtist,
|
|
1024
1042
|
UserAffinity: UserAffinity,
|
|
1025
1043
|
UserArtistAffinity: UserArtistAffinity,
|
|
1044
|
+
UserBookmarks: UserBookmarks,
|
|
1026
1045
|
UserComments: UserComments,
|
|
1027
1046
|
UserContacts: UserContacts,
|
|
1028
1047
|
UserEngagementFactor: UserEngagementFactor,
|