@earbug/db-models 0.0.42 → 0.0.44

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.
@@ -181,6 +181,8 @@ import { UnmatchedAlbum as _UnmatchedAlbum } from "./UnmatchedAlbum";
181
181
  import type { UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes } from "./UnmatchedAlbum";
182
182
  import { UnmatchedArtist as _UnmatchedArtist } from "./UnmatchedArtist";
183
183
  import type { UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes } from "./UnmatchedArtist";
184
+ import { UserAbuseReports as _UserAbuseReports } from "./UserAbuseReports";
185
+ import type { UserAbuseReportsAttributes, UserAbuseReportsCreationAttributes } from "./UserAbuseReports";
184
186
  import { UserAffinity as _UserAffinity } from "./UserAffinity";
185
187
  import type { UserAffinityAttributes, UserAffinityCreationAttributes } from "./UserAffinity";
186
188
  import { UserArtistAffinity as _UserArtistAffinity } from "./UserArtistAffinity";
@@ -320,6 +322,7 @@ export {
320
322
  _TrackDeletionReason as TrackDeletionReason,
321
323
  _UnmatchedAlbum as UnmatchedAlbum,
322
324
  _UnmatchedArtist as UnmatchedArtist,
325
+ _UserAbuseReports as UserAbuseReports,
323
326
  _UserAffinity as UserAffinity,
324
327
  _UserArtistAffinity as UserArtistAffinity,
325
328
  _UserBookmarks as UserBookmarks,
@@ -528,6 +531,8 @@ export type {
528
531
  UnmatchedAlbumCreationAttributes,
529
532
  UnmatchedArtistAttributes,
530
533
  UnmatchedArtistCreationAttributes,
534
+ UserAbuseReportsAttributes,
535
+ UserAbuseReportsCreationAttributes,
531
536
  UserAffinityAttributes,
532
537
  UserAffinityCreationAttributes,
533
538
  UserArtistAffinityAttributes,
@@ -668,6 +673,7 @@ export function initModels(sequelize: Sequelize) {
668
673
  const TrackDeletionReason = _TrackDeletionReason.initModel(sequelize);
669
674
  const UnmatchedAlbum = _UnmatchedAlbum.initModel(sequelize);
670
675
  const UnmatchedArtist = _UnmatchedArtist.initModel(sequelize);
676
+ const UserAbuseReports = _UserAbuseReports.initModel(sequelize);
671
677
  const UserAffinity = _UserAffinity.initModel(sequelize);
672
678
  const UserArtistAffinity = _UserArtistAffinity.initModel(sequelize);
673
679
  const UserBookmarks = _UserBookmarks.initModel(sequelize);
@@ -776,6 +782,8 @@ export function initModels(sequelize: Sequelize) {
776
782
  AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId"});
777
783
  RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId"});
778
784
  AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId"});
785
+ UserAbuseReports.belongsTo(AppUser, { as: "reporterUser", foreignKey: "reporterUserId"});
786
+ AppUser.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "reporterUserId"});
779
787
  UserAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId"});
780
788
  AppUser.hasMany(UserAffinity, { as: "userAffinities", foreignKey: "userId"});
781
789
  UserArtistAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId"});
@@ -916,6 +924,8 @@ export function initModels(sequelize: Sequelize) {
916
924
  JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId"});
917
925
  Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId"});
918
926
  JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId"});
927
+ UserAbuseReports.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
928
+ JukeboxSession.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "jukeboxId"});
919
929
  UserBookmarks.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
920
930
  JukeboxSession.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "jukeboxId"});
921
931
  UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
@@ -1046,6 +1056,8 @@ export function initModels(sequelize: Sequelize) {
1046
1056
  PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId"});
1047
1057
  PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId"});
1048
1058
  PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId"});
1059
+ UserAbuseReports.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
1060
+ PlatformUserPlaylist.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "playlistId"});
1049
1061
  UserBookmarks.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
1050
1062
  PlatformUserPlaylist.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "playlistId"});
1051
1063
  UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
@@ -1062,12 +1074,16 @@ export function initModels(sequelize: Sequelize) {
1062
1074
  RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId"});
1063
1075
  RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
1064
1076
  RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId"});
1077
+ UserAbuseReports.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
1078
+ RadioShow.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "radioShowId"});
1065
1079
  UserBookmarks.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
1066
1080
  RadioShow.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "radioShowId"});
1067
1081
  UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
1068
1082
  RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId"});
1069
1083
  UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
1070
1084
  RadioShow.hasMany(UserLikes, { as: "userLikes", foreignKey: "radioShowId"});
1085
+ UserAbuseReports.belongsTo(RadioShowMedia, { as: "radioShowMedium", foreignKey: "radioShowMediaId"});
1086
+ RadioShowMedia.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "radioShowMediaId"});
1071
1087
  AppUser.belongsTo(State, { as: "state", foreignKey: "stateId"});
1072
1088
  State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId"});
1073
1089
  PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId"});
@@ -1076,8 +1092,12 @@ export function initModels(sequelize: Sequelize) {
1076
1092
  State.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "stateId"});
1077
1093
  JukeboxQueueEntry.belongsTo(TrackDeletionReason, { as: "trackDeletionReason", foreignKey: "trackDeletionReasonId"});
1078
1094
  TrackDeletionReason.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackDeletionReasonId"});
1095
+ UserAbuseReports.belongsTo(UserComments, { as: "comment", foreignKey: "commentId"});
1096
+ UserComments.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "commentId"});
1079
1097
  UserComments.belongsTo(UserComments, { as: "replyComment", foreignKey: "replyCommentId"});
1080
1098
  UserComments.hasMany(UserComments, { as: "userComments", foreignKey: "replyCommentId"});
1099
+ UserAbuseReports.belongsTo(UserMessages, { as: "directMessage", foreignKey: "directMessageId"});
1100
+ UserMessages.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "directMessageId"});
1081
1101
  UserMessages.belongsTo(UserMessages, { as: "replyMessage", foreignKey: "replyMessageId"});
1082
1102
  UserMessages.hasMany(UserMessages, { as: "userMessages", foreignKey: "replyMessageId"});
1083
1103
  GuestUser.belongsTo(Versus, { as: "versu", foreignKey: "versusId"});
@@ -1203,6 +1223,7 @@ export function initModels(sequelize: Sequelize) {
1203
1223
  TrackDeletionReason: TrackDeletionReason,
1204
1224
  UnmatchedAlbum: UnmatchedAlbum,
1205
1225
  UnmatchedArtist: UnmatchedArtist,
1226
+ UserAbuseReports: UserAbuseReports,
1206
1227
  UserAffinity: UserAffinity,
1207
1228
  UserArtistAffinity: UserArtistAffinity,
1208
1229
  UserBookmarks: UserBookmarks,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earbug/db-models",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {