@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.
- package/dist/AppUser.d.ts +12 -0
- package/dist/CanonArtist.d.ts +5 -3
- package/dist/CanonArtist.js +11 -5
- package/dist/JukeboxSession.d.ts +12 -0
- package/dist/PlatformUserPlaylist.d.ts +12 -0
- package/dist/RadioShow.d.ts +12 -0
- package/dist/RadioShowMedia.d.ts +12 -0
- package/dist/UserAbuseReports.d.ts +70 -0
- package/dist/UserAbuseReports.js +182 -0
- package/dist/UserComments.d.ts +12 -0
- package/dist/UserMessages.d.ts +12 -0
- package/dist/init-models.d.ts +5 -2
- package/dist/init-models.js +20 -2
- package/models/AppUser.ts +13 -0
- package/models/CanonArtist.ts +16 -8
- package/models/JukeboxSession.ts +13 -0
- package/models/PlatformUserPlaylist.ts +13 -0
- package/models/RadioShow.ts +13 -0
- package/models/RadioShowMedia.ts +13 -0
- package/models/UserAbuseReports.ts +232 -0
- package/models/UserComments.ts +13 -0
- package/models/UserMessages.ts +13 -0
- package/models/init-models.ts +21 -0
- package/package.json +1 -1
package/dist/init-models.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.
|
|
5
|
-
exports.VersusVotingMode = exports.VersusVotingListType = exports.VersusQuestionVariableType = exports.VersusQuestion = exports.VersusPublishIssue = exports.VersusOption = exports.VersusEntityKind = exports.VersusEndVoteThreshold = exports.VersusEndTimerDuration = exports.VersusEndMode = exports.VersusCreatorScope = exports.VersusCoCreator = exports.VersusAccessType = exports.Versus = void 0;
|
|
4
|
+
exports.UserLikes = exports.UserGenreAffinity = exports.UserEngagementFactor = exports.UserContacts = exports.UserComments = exports.UserBookmarks = exports.UserArtistAffinity = exports.UserAffinity = exports.UserAbuseReports = 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
|
+
exports.VersusVotingMode = exports.VersusVotingListType = exports.VersusQuestionVariableType = exports.VersusQuestion = exports.VersusPublishIssue = exports.VersusOption = exports.VersusEntityKind = exports.VersusEndVoteThreshold = exports.VersusEndTimerDuration = exports.VersusEndMode = exports.VersusCreatorScope = exports.VersusCoCreator = exports.VersusAccessType = exports.Versus = exports.UserMessages = void 0;
|
|
6
6
|
exports.initModels = initModels;
|
|
7
7
|
const AccessControlPreference_1 = require("./AccessControlPreference");
|
|
8
8
|
Object.defineProperty(exports, "AccessControlPreference", { enumerable: true, get: function () { return AccessControlPreference_1.AccessControlPreference; } });
|
|
@@ -186,6 +186,8 @@ const UnmatchedAlbum_1 = require("./UnmatchedAlbum");
|
|
|
186
186
|
Object.defineProperty(exports, "UnmatchedAlbum", { enumerable: true, get: function () { return UnmatchedAlbum_1.UnmatchedAlbum; } });
|
|
187
187
|
const UnmatchedArtist_1 = require("./UnmatchedArtist");
|
|
188
188
|
Object.defineProperty(exports, "UnmatchedArtist", { enumerable: true, get: function () { return UnmatchedArtist_1.UnmatchedArtist; } });
|
|
189
|
+
const UserAbuseReports_1 = require("./UserAbuseReports");
|
|
190
|
+
Object.defineProperty(exports, "UserAbuseReports", { enumerable: true, get: function () { return UserAbuseReports_1.UserAbuseReports; } });
|
|
189
191
|
const UserAffinity_1 = require("./UserAffinity");
|
|
190
192
|
Object.defineProperty(exports, "UserAffinity", { enumerable: true, get: function () { return UserAffinity_1.UserAffinity; } });
|
|
191
193
|
const UserArtistAffinity_1 = require("./UserArtistAffinity");
|
|
@@ -324,6 +326,7 @@ function initModels(sequelize) {
|
|
|
324
326
|
const TrackDeletionReason = TrackDeletionReason_1.TrackDeletionReason.initModel(sequelize);
|
|
325
327
|
const UnmatchedAlbum = UnmatchedAlbum_1.UnmatchedAlbum.initModel(sequelize);
|
|
326
328
|
const UnmatchedArtist = UnmatchedArtist_1.UnmatchedArtist.initModel(sequelize);
|
|
329
|
+
const UserAbuseReports = UserAbuseReports_1.UserAbuseReports.initModel(sequelize);
|
|
327
330
|
const UserAffinity = UserAffinity_1.UserAffinity.initModel(sequelize);
|
|
328
331
|
const UserArtistAffinity = UserArtistAffinity_1.UserArtistAffinity.initModel(sequelize);
|
|
329
332
|
const UserBookmarks = UserBookmarks_1.UserBookmarks.initModel(sequelize);
|
|
@@ -431,6 +434,8 @@ function initModels(sequelize) {
|
|
|
431
434
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId" });
|
|
432
435
|
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId" });
|
|
433
436
|
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId" });
|
|
437
|
+
UserAbuseReports.belongsTo(AppUser, { as: "reporterUser", foreignKey: "reporterUserId" });
|
|
438
|
+
AppUser.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "reporterUserId" });
|
|
434
439
|
UserAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId" });
|
|
435
440
|
AppUser.hasMany(UserAffinity, { as: "userAffinities", foreignKey: "userId" });
|
|
436
441
|
UserArtistAffinity.belongsTo(AppUser, { as: "user", foreignKey: "userId" });
|
|
@@ -571,6 +576,8 @@ function initModels(sequelize) {
|
|
|
571
576
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId" });
|
|
572
577
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId" });
|
|
573
578
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId" });
|
|
579
|
+
UserAbuseReports.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
580
|
+
JukeboxSession.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "jukeboxId" });
|
|
574
581
|
UserBookmarks.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
575
582
|
JukeboxSession.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "jukeboxId" });
|
|
576
583
|
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
@@ -701,6 +708,8 @@ function initModels(sequelize) {
|
|
|
701
708
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId" });
|
|
702
709
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
703
710
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
711
|
+
UserAbuseReports.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
712
|
+
PlatformUserPlaylist.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "playlistId" });
|
|
704
713
|
UserBookmarks.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
705
714
|
PlatformUserPlaylist.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "playlistId" });
|
|
706
715
|
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
@@ -717,12 +726,16 @@ function initModels(sequelize) {
|
|
|
717
726
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId" });
|
|
718
727
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
719
728
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId" });
|
|
729
|
+
UserAbuseReports.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
730
|
+
RadioShow.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "radioShowId" });
|
|
720
731
|
UserBookmarks.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
721
732
|
RadioShow.hasMany(UserBookmarks, { as: "userBookmarks", foreignKey: "radioShowId" });
|
|
722
733
|
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
723
734
|
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId" });
|
|
724
735
|
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
725
736
|
RadioShow.hasMany(UserLikes, { as: "userLikes", foreignKey: "radioShowId" });
|
|
737
|
+
UserAbuseReports.belongsTo(RadioShowMedia, { as: "radioShowMedium", foreignKey: "radioShowMediaId" });
|
|
738
|
+
RadioShowMedia.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "radioShowMediaId" });
|
|
726
739
|
AppUser.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
727
740
|
State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId" });
|
|
728
741
|
PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
@@ -731,8 +744,12 @@ function initModels(sequelize) {
|
|
|
731
744
|
State.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "stateId" });
|
|
732
745
|
JukeboxQueueEntry.belongsTo(TrackDeletionReason, { as: "trackDeletionReason", foreignKey: "trackDeletionReasonId" });
|
|
733
746
|
TrackDeletionReason.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackDeletionReasonId" });
|
|
747
|
+
UserAbuseReports.belongsTo(UserComments, { as: "comment", foreignKey: "commentId" });
|
|
748
|
+
UserComments.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "commentId" });
|
|
734
749
|
UserComments.belongsTo(UserComments, { as: "replyComment", foreignKey: "replyCommentId" });
|
|
735
750
|
UserComments.hasMany(UserComments, { as: "userComments", foreignKey: "replyCommentId" });
|
|
751
|
+
UserAbuseReports.belongsTo(UserMessages, { as: "directMessage", foreignKey: "directMessageId" });
|
|
752
|
+
UserMessages.hasMany(UserAbuseReports, { as: "userAbuseReports", foreignKey: "directMessageId" });
|
|
736
753
|
UserMessages.belongsTo(UserMessages, { as: "replyMessage", foreignKey: "replyMessageId" });
|
|
737
754
|
UserMessages.hasMany(UserMessages, { as: "userMessages", foreignKey: "replyMessageId" });
|
|
738
755
|
GuestUser.belongsTo(Versus, { as: "versu", foreignKey: "versusId" });
|
|
@@ -857,6 +874,7 @@ function initModels(sequelize) {
|
|
|
857
874
|
TrackDeletionReason: TrackDeletionReason,
|
|
858
875
|
UnmatchedAlbum: UnmatchedAlbum,
|
|
859
876
|
UnmatchedArtist: UnmatchedArtist,
|
|
877
|
+
UserAbuseReports: UserAbuseReports,
|
|
860
878
|
UserAffinity: UserAffinity,
|
|
861
879
|
UserArtistAffinity: UserArtistAffinity,
|
|
862
880
|
UserBookmarks: UserBookmarks,
|
package/models/AppUser.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum
|
|
|
11
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
12
12
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
13
13
|
import type { State, StateId } from './State';
|
|
14
|
+
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
14
15
|
import type { UserAffinity, UserAffinityId } from './UserAffinity';
|
|
15
16
|
import type { UserArtistAffinity, UserArtistAffinityId } from './UserArtistAffinity';
|
|
16
17
|
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
@@ -206,6 +207,18 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
206
207
|
hasRadioShow!: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
|
|
207
208
|
hasRadioShows!: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
|
|
208
209
|
countRadioShows!: Sequelize.HasManyCountAssociationsMixin;
|
|
210
|
+
// AppUser hasMany UserAbuseReports via reporterUserId
|
|
211
|
+
userAbuseReports!: UserAbuseReports[];
|
|
212
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
213
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
214
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
215
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
216
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
217
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
218
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
219
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
220
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
221
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
209
222
|
// AppUser hasMany UserAffinity via userId
|
|
210
223
|
userAffinities!: UserAffinity[];
|
|
211
224
|
getUserAffinities!: Sequelize.HasManyGetAssociationsMixin<UserAffinity>;
|
package/models/CanonArtist.ts
CHANGED
|
@@ -29,14 +29,15 @@ export interface CanonArtistAttributes {
|
|
|
29
29
|
lastImageHarvestAttempt?: Date;
|
|
30
30
|
merchHarvestDay?: number;
|
|
31
31
|
newsHarvestDay?: number;
|
|
32
|
-
harvestPopularity?: number;
|
|
33
32
|
lastGenreHarvestAttempt?: Date;
|
|
34
33
|
genreHarvestCount: number;
|
|
34
|
+
popularityRank?: number;
|
|
35
|
+
popularityScore: number;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export type CanonArtistPk = "id";
|
|
38
39
|
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
39
|
-
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay" | "
|
|
40
|
+
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay" | "lastGenreHarvestAttempt" | "genreHarvestCount" | "popularityRank" | "popularityScore";
|
|
40
41
|
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
41
42
|
|
|
42
43
|
export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
@@ -52,9 +53,10 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
52
53
|
lastImageHarvestAttempt?: Date;
|
|
53
54
|
merchHarvestDay?: number;
|
|
54
55
|
newsHarvestDay?: number;
|
|
55
|
-
harvestPopularity?: number;
|
|
56
56
|
lastGenreHarvestAttempt?: Date;
|
|
57
57
|
genreHarvestCount!: number;
|
|
58
|
+
popularityRank?: number;
|
|
59
|
+
popularityScore!: number;
|
|
58
60
|
|
|
59
61
|
// CanonArtist hasMany CanonArtistAlbumRelation via canonArtistId
|
|
60
62
|
canonArtistAlbumRelations!: CanonArtistAlbumRelation[];
|
|
@@ -301,11 +303,6 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
301
303
|
allowNull: true,
|
|
302
304
|
field: 'news_harvest_day'
|
|
303
305
|
},
|
|
304
|
-
harvestPopularity: {
|
|
305
|
-
type: DataTypes.INTEGER,
|
|
306
|
-
allowNull: true,
|
|
307
|
-
field: 'harvest_popularity'
|
|
308
|
-
},
|
|
309
306
|
lastGenreHarvestAttempt: {
|
|
310
307
|
type: DataTypes.DATE,
|
|
311
308
|
allowNull: true,
|
|
@@ -316,6 +313,17 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
316
313
|
allowNull: false,
|
|
317
314
|
defaultValue: 0,
|
|
318
315
|
field: 'genre_harvest_count'
|
|
316
|
+
},
|
|
317
|
+
popularityRank: {
|
|
318
|
+
type: DataTypes.INTEGER,
|
|
319
|
+
allowNull: true,
|
|
320
|
+
field: 'popularity_rank'
|
|
321
|
+
},
|
|
322
|
+
popularityScore: {
|
|
323
|
+
type: DataTypes.INTEGER,
|
|
324
|
+
allowNull: false,
|
|
325
|
+
defaultValue: 0,
|
|
326
|
+
field: 'popularity_score'
|
|
319
327
|
}
|
|
320
328
|
}, {
|
|
321
329
|
sequelize,
|
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 { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
16
17
|
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
17
18
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
18
19
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
@@ -159,6 +160,18 @@ export class JukeboxSession extends Model<JukeboxSessionAttributes, JukeboxSessi
|
|
|
159
160
|
hasNotification!: Sequelize.HasManyHasAssociationMixin<Notification, NotificationId>;
|
|
160
161
|
hasNotifications!: Sequelize.HasManyHasAssociationsMixin<Notification, NotificationId>;
|
|
161
162
|
countNotifications!: Sequelize.HasManyCountAssociationsMixin;
|
|
163
|
+
// JukeboxSession hasMany UserAbuseReports via jukeboxId
|
|
164
|
+
userAbuseReports!: UserAbuseReports[];
|
|
165
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
166
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
167
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
168
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
169
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
170
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
171
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
172
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
173
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
174
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
162
175
|
// JukeboxSession hasMany UserBookmarks via jukeboxId
|
|
163
176
|
userBookmarks!: UserBookmarks[];
|
|
164
177
|
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
@@ -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 { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
9
10
|
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
10
11
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
11
12
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
@@ -92,6 +93,18 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
92
93
|
hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
93
94
|
hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
94
95
|
countPlatformUserPlaylistTracks!: Sequelize.HasManyCountAssociationsMixin;
|
|
96
|
+
// PlatformUserPlaylist hasMany UserAbuseReports via playlistId
|
|
97
|
+
userAbuseReports!: UserAbuseReports[];
|
|
98
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
99
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
100
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
101
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
102
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
103
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
104
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
105
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
106
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
107
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
95
108
|
// PlatformUserPlaylist hasMany UserBookmarks via playlistId
|
|
96
109
|
userBookmarks!: UserBookmarks[];
|
|
97
110
|
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
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 { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
8
9
|
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
9
10
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
10
11
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
@@ -88,6 +89,18 @@ export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttri
|
|
|
88
89
|
hasRadioShowPublishRequest!: Sequelize.HasManyHasAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
|
|
89
90
|
hasRadioShowPublishRequests!: Sequelize.HasManyHasAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
|
|
90
91
|
countRadioShowPublishRequests!: Sequelize.HasManyCountAssociationsMixin;
|
|
92
|
+
// RadioShow hasMany UserAbuseReports via radioShowId
|
|
93
|
+
userAbuseReports!: UserAbuseReports[];
|
|
94
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
95
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
96
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
97
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
98
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
99
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
100
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
101
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
102
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
103
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
91
104
|
// RadioShow hasMany UserBookmarks via radioShowId
|
|
92
105
|
userBookmarks!: UserBookmarks[];
|
|
93
106
|
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
package/models/RadioShowMedia.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
4
|
+
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
4
5
|
|
|
5
6
|
export interface RadioShowMediaAttributes {
|
|
6
7
|
radioShowId: string;
|
|
@@ -51,6 +52,18 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
|
|
|
51
52
|
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
52
53
|
setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
53
54
|
createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
55
|
+
// RadioShowMedia hasMany UserAbuseReports via radioShowMediaId
|
|
56
|
+
userAbuseReports!: UserAbuseReports[];
|
|
57
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
58
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
59
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
60
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
61
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
62
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
63
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
64
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
65
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
66
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
54
67
|
|
|
55
68
|
static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowMedia {
|
|
56
69
|
return RadioShowMedia.init({
|
|
@@ -0,0 +1,232 @@
|
|
|
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 { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
7
|
+
import type { RadioShowMedia, RadioShowMediaId } from './RadioShowMedia';
|
|
8
|
+
import type { UserComments, UserCommentsId } from './UserComments';
|
|
9
|
+
import type { UserMessages, UserMessagesId } from './UserMessages';
|
|
10
|
+
|
|
11
|
+
export interface UserAbuseReportsAttributes {
|
|
12
|
+
reporterUserId: string;
|
|
13
|
+
jukeboxId?: string;
|
|
14
|
+
jukeboxChatMessageId?: string;
|
|
15
|
+
radioShowId?: string;
|
|
16
|
+
radioShowMediaId?: string;
|
|
17
|
+
playlistId?: string;
|
|
18
|
+
versusThemeTextId?: string;
|
|
19
|
+
commentId?: string;
|
|
20
|
+
directMessageId?: string;
|
|
21
|
+
id: string;
|
|
22
|
+
reportDate: Date;
|
|
23
|
+
updateDate: Date;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type UserAbuseReportsPk = "id";
|
|
27
|
+
export type UserAbuseReportsId = UserAbuseReports[UserAbuseReportsPk];
|
|
28
|
+
export type UserAbuseReportsOptionalAttributes = "jukeboxId" | "jukeboxChatMessageId" | "radioShowId" | "radioShowMediaId" | "playlistId" | "versusThemeTextId" | "commentId" | "directMessageId" | "id" | "reportDate" | "updateDate";
|
|
29
|
+
export type UserAbuseReportsCreationAttributes = Optional<UserAbuseReportsAttributes, UserAbuseReportsOptionalAttributes>;
|
|
30
|
+
|
|
31
|
+
export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbuseReportsCreationAttributes> implements UserAbuseReportsAttributes {
|
|
32
|
+
reporterUserId!: string;
|
|
33
|
+
jukeboxId?: string;
|
|
34
|
+
jukeboxChatMessageId?: string;
|
|
35
|
+
radioShowId?: string;
|
|
36
|
+
radioShowMediaId?: string;
|
|
37
|
+
playlistId?: string;
|
|
38
|
+
versusThemeTextId?: string;
|
|
39
|
+
commentId?: string;
|
|
40
|
+
directMessageId?: string;
|
|
41
|
+
id!: string;
|
|
42
|
+
reportDate!: Date;
|
|
43
|
+
updateDate!: Date;
|
|
44
|
+
|
|
45
|
+
// UserAbuseReports belongsTo AppUser via reporterUserId
|
|
46
|
+
reporterUser!: AppUser;
|
|
47
|
+
getReporterUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
48
|
+
setReporterUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
49
|
+
createReporterUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
50
|
+
// UserAbuseReports belongsTo JukeboxSession via jukeboxId
|
|
51
|
+
jukebox!: JukeboxSession;
|
|
52
|
+
getJukebox!: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
53
|
+
setJukebox!: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
54
|
+
createJukebox!: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
55
|
+
// UserAbuseReports belongsTo PlatformUserPlaylist via playlistId
|
|
56
|
+
playlist!: PlatformUserPlaylist;
|
|
57
|
+
getPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
58
|
+
setPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
59
|
+
createPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
60
|
+
// UserAbuseReports belongsTo RadioShow via radioShowId
|
|
61
|
+
radioShow!: RadioShow;
|
|
62
|
+
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
63
|
+
setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
64
|
+
createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
65
|
+
// UserAbuseReports belongsTo RadioShowMedia via radioShowMediaId
|
|
66
|
+
radioShowMedium!: RadioShowMedia;
|
|
67
|
+
getRadioShowMedium!: Sequelize.BelongsToGetAssociationMixin<RadioShowMedia>;
|
|
68
|
+
setRadioShowMedium!: Sequelize.BelongsToSetAssociationMixin<RadioShowMedia, RadioShowMediaId>;
|
|
69
|
+
createRadioShowMedium!: Sequelize.BelongsToCreateAssociationMixin<RadioShowMedia>;
|
|
70
|
+
// UserAbuseReports belongsTo UserComments via commentId
|
|
71
|
+
comment!: UserComments;
|
|
72
|
+
getComment!: Sequelize.BelongsToGetAssociationMixin<UserComments>;
|
|
73
|
+
setComment!: Sequelize.BelongsToSetAssociationMixin<UserComments, UserCommentsId>;
|
|
74
|
+
createComment!: Sequelize.BelongsToCreateAssociationMixin<UserComments>;
|
|
75
|
+
// UserAbuseReports belongsTo UserMessages via directMessageId
|
|
76
|
+
directMessage!: UserMessages;
|
|
77
|
+
getDirectMessage!: Sequelize.BelongsToGetAssociationMixin<UserMessages>;
|
|
78
|
+
setDirectMessage!: Sequelize.BelongsToSetAssociationMixin<UserMessages, UserMessagesId>;
|
|
79
|
+
createDirectMessage!: Sequelize.BelongsToCreateAssociationMixin<UserMessages>;
|
|
80
|
+
|
|
81
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserAbuseReports {
|
|
82
|
+
return UserAbuseReports.init({
|
|
83
|
+
reporterUserId: {
|
|
84
|
+
type: DataTypes.UUID,
|
|
85
|
+
allowNull: false,
|
|
86
|
+
references: {
|
|
87
|
+
model: 'app_user',
|
|
88
|
+
key: 'id'
|
|
89
|
+
},
|
|
90
|
+
field: 'reporter_user_id'
|
|
91
|
+
},
|
|
92
|
+
jukeboxId: {
|
|
93
|
+
type: DataTypes.UUID,
|
|
94
|
+
allowNull: true,
|
|
95
|
+
references: {
|
|
96
|
+
model: 'jukebox_session',
|
|
97
|
+
key: 'id'
|
|
98
|
+
},
|
|
99
|
+
field: 'jukebox_id'
|
|
100
|
+
},
|
|
101
|
+
jukeboxChatMessageId: {
|
|
102
|
+
type: DataTypes.STRING(50),
|
|
103
|
+
allowNull: true,
|
|
104
|
+
field: 'jukebox_chat_message_id'
|
|
105
|
+
},
|
|
106
|
+
radioShowId: {
|
|
107
|
+
type: DataTypes.UUID,
|
|
108
|
+
allowNull: true,
|
|
109
|
+
references: {
|
|
110
|
+
model: 'radio_show',
|
|
111
|
+
key: 'id'
|
|
112
|
+
},
|
|
113
|
+
field: 'radio_show_id'
|
|
114
|
+
},
|
|
115
|
+
radioShowMediaId: {
|
|
116
|
+
type: DataTypes.UUID,
|
|
117
|
+
allowNull: true,
|
|
118
|
+
references: {
|
|
119
|
+
model: 'radio_show_media',
|
|
120
|
+
key: 'id'
|
|
121
|
+
},
|
|
122
|
+
field: 'radio_show_media_id'
|
|
123
|
+
},
|
|
124
|
+
playlistId: {
|
|
125
|
+
type: DataTypes.UUID,
|
|
126
|
+
allowNull: true,
|
|
127
|
+
references: {
|
|
128
|
+
model: 'platform_user_playlist',
|
|
129
|
+
key: 'id'
|
|
130
|
+
},
|
|
131
|
+
field: 'playlist_id'
|
|
132
|
+
},
|
|
133
|
+
versusThemeTextId: {
|
|
134
|
+
type: DataTypes.UUID,
|
|
135
|
+
allowNull: true,
|
|
136
|
+
field: 'versus_theme_text_id'
|
|
137
|
+
},
|
|
138
|
+
commentId: {
|
|
139
|
+
type: DataTypes.UUID,
|
|
140
|
+
allowNull: true,
|
|
141
|
+
references: {
|
|
142
|
+
model: 'user_comments',
|
|
143
|
+
key: 'id'
|
|
144
|
+
},
|
|
145
|
+
field: 'comment_id'
|
|
146
|
+
},
|
|
147
|
+
directMessageId: {
|
|
148
|
+
type: DataTypes.UUID,
|
|
149
|
+
allowNull: true,
|
|
150
|
+
references: {
|
|
151
|
+
model: 'user_messages',
|
|
152
|
+
key: 'id'
|
|
153
|
+
},
|
|
154
|
+
field: 'direct_message_id'
|
|
155
|
+
},
|
|
156
|
+
id: {
|
|
157
|
+
type: DataTypes.UUID,
|
|
158
|
+
allowNull: false,
|
|
159
|
+
defaultValue: DataTypes.UUIDV4,
|
|
160
|
+
primaryKey: true
|
|
161
|
+
},
|
|
162
|
+
reportDate: {
|
|
163
|
+
type: DataTypes.DATE,
|
|
164
|
+
allowNull: false,
|
|
165
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
166
|
+
field: 'report_date'
|
|
167
|
+
},
|
|
168
|
+
updateDate: {
|
|
169
|
+
type: DataTypes.DATE,
|
|
170
|
+
allowNull: false,
|
|
171
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
172
|
+
field: 'update_date'
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
sequelize,
|
|
176
|
+
tableName: 'user_abuse_reports',
|
|
177
|
+
schema: 'eb',
|
|
178
|
+
timestamps: false,
|
|
179
|
+
indexes: [
|
|
180
|
+
{
|
|
181
|
+
name: "idx_user_abuse_reports_comment",
|
|
182
|
+
fields: [
|
|
183
|
+
{ name: "comment_id" },
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "idx_user_abuse_reports_direct_message",
|
|
188
|
+
fields: [
|
|
189
|
+
{ name: "direct_message_id" },
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "idx_user_abuse_reports_jukebox",
|
|
194
|
+
fields: [
|
|
195
|
+
{ name: "jukebox_id" },
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "idx_user_abuse_reports_playlist",
|
|
200
|
+
fields: [
|
|
201
|
+
{ name: "playlist_id" },
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "idx_user_abuse_reports_radio_show",
|
|
206
|
+
fields: [
|
|
207
|
+
{ name: "radio_show_id" },
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "idx_user_abuse_reports_radio_show_media",
|
|
212
|
+
fields: [
|
|
213
|
+
{ name: "radio_show_media_id" },
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: "idx_user_abuse_reports_reporter",
|
|
218
|
+
fields: [
|
|
219
|
+
{ name: "reporter_user_id" },
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: "user_abuse_reports_pkey",
|
|
224
|
+
unique: true,
|
|
225
|
+
fields: [
|
|
226
|
+
{ name: "id" },
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
]
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
package/models/UserComments.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
5
5
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
6
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
7
|
+
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
7
8
|
|
|
8
9
|
export interface UserCommentsAttributes {
|
|
9
10
|
appUserId: string;
|
|
@@ -63,6 +64,18 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
|
|
|
63
64
|
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
64
65
|
setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
65
66
|
createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
67
|
+
// UserComments hasMany UserAbuseReports via commentId
|
|
68
|
+
userAbuseReports!: UserAbuseReports[];
|
|
69
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
70
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
71
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
72
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
73
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
74
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
75
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
76
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
77
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
78
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
66
79
|
// UserComments belongsTo UserComments via replyCommentId
|
|
67
80
|
replyComment!: UserComments;
|
|
68
81
|
getReplyComment!: Sequelize.BelongsToGetAssociationMixin<UserComments>;
|
package/models/UserMessages.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
4
5
|
|
|
5
6
|
export interface UserMessagesAttributes {
|
|
6
7
|
senderId: string;
|
|
@@ -44,6 +45,18 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
|
|
|
44
45
|
getSender!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
45
46
|
setSender!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
46
47
|
createSender!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
48
|
+
// UserMessages hasMany UserAbuseReports via directMessageId
|
|
49
|
+
userAbuseReports!: UserAbuseReports[];
|
|
50
|
+
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
51
|
+
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
52
|
+
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
53
|
+
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
54
|
+
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
55
|
+
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
56
|
+
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
57
|
+
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
58
|
+
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
59
|
+
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
47
60
|
// UserMessages belongsTo UserMessages via replyMessageId
|
|
48
61
|
replyMessage!: UserMessages;
|
|
49
62
|
getReplyMessage!: Sequelize.BelongsToGetAssociationMixin<UserMessages>;
|