@earbug/db-models 0.0.62 → 0.0.64
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/.dockerignore +10 -0
- package/.github/workflows/publish.yaml +303 -0
- package/.nvmrc +1 -0
- package/Dockerfile.generate +19 -0
- package/dist/RadioShow.d.ts +8 -1
- package/dist/RadioShow.js +16 -0
- package/dist/RadioShowType.d.ts +26 -0
- package/dist/RadioShowType.js +42 -0
- package/dist/init-models.d.ts +5 -2
- package/dist/init-models.js +8 -2
- package/model_options.json +3 -0
- package/models/AccessControlPreference.ts +53 -0
- package/models/AffinityRelationshipType.ts +96 -0
- package/models/AffinityTier.ts +131 -0
- package/models/AppUser.ts +577 -0
- package/models/AppUserDevice.ts +101 -0
- package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
- package/models/AppUserFollowRelation.ts +128 -0
- package/models/AppUserPlatformRelation.ts +150 -0
- package/models/CanonAlbum.ts +229 -0
- package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
- package/models/CanonAlbumGenreRelation.ts +86 -0
- package/models/CanonAlbumLabelRelation.ts +86 -0
- package/models/CanonAlbumTrackRelation.ts +92 -0
- package/models/CanonArtist.ts +356 -0
- package/models/CanonArtistAlbumRelation.ts +92 -0
- package/models/CanonArtistExternalReferenceRelation.ts +92 -0
- package/models/CanonArtistGenreRelation.ts +86 -0
- package/models/CanonArtistMemberRelation.ts +86 -0
- package/models/CanonArtistTrackRelation.ts +92 -0
- package/models/CanonGenre.ts +273 -0
- package/models/CanonGenreExternalReferenceRelation.ts +92 -0
- package/models/CanonLabel.ts +129 -0
- package/models/CanonLabelExternalReferenceRelation.ts +92 -0
- package/models/CanonMember.ts +130 -0
- package/models/CanonMemberExternalReferenceRelation.ts +99 -0
- package/models/CanonToPlatformAlbumRelation.ts +92 -0
- package/models/CanonToPlatformArtistRelation.ts +92 -0
- package/models/CanonToPlatformGenreRelation.ts +86 -0
- package/models/CanonToPlatformTrackRelation.ts +92 -0
- package/models/CanonTrack.ts +232 -0
- package/models/ConfigParam.ts +62 -0
- package/models/ExternalReference.ts +201 -0
- package/models/FeedConfig.ts +65 -0
- package/models/FeedContentType.ts +124 -0
- package/models/GuestUser.ts +137 -0
- package/models/JukeboxAccessType.ts +60 -0
- package/models/JukeboxCanonGenreRelation.ts +108 -0
- package/models/JukeboxInvite.ts +125 -0
- package/models/JukeboxQueueEntry.ts +247 -0
- package/models/JukeboxQueueMode.ts +60 -0
- package/models/JukeboxSession.ts +334 -0
- package/models/JukeboxSessionArtistAffinity.ts +136 -0
- package/models/JukeboxSessionGenreAffinity.ts +136 -0
- package/models/JukeboxStatus.ts +58 -0
- package/models/JukeboxTerminationCondition.ts +60 -0
- package/models/JukeboxType.ts +60 -0
- package/models/JukeboxUser.ts +182 -0
- package/models/JukeboxUserType.ts +58 -0
- package/models/KnexMigrations.ts +60 -0
- package/models/KnexMigrationsLock.ts +48 -0
- package/models/MerchItem.ts +198 -0
- package/models/MerchOrchestration.ts +130 -0
- package/models/MerchPlatform.ts +95 -0
- package/models/MerchType.ts +89 -0
- package/models/MetricsDaily.ts +79 -0
- package/models/MetricsEvent.ts +124 -0
- package/models/NewsArticle.ts +177 -0
- package/models/NewsPlatform.ts +76 -0
- package/models/NewsSite.ts +75 -0
- package/models/Notification.ts +214 -0
- package/models/NotificationType.ts +66 -0
- package/models/PauseStatusType.ts +58 -0
- package/models/Platform.ts +189 -0
- package/models/PlatformAlbum.ts +398 -0
- package/models/PlatformAlbumGenreRelation.ts +86 -0
- package/models/PlatformAlbumTrackRelation.ts +92 -0
- package/models/PlatformArtist.ts +358 -0
- package/models/PlatformArtistAlbumRelation.ts +92 -0
- package/models/PlatformArtistGenreRelation.ts +86 -0
- package/models/PlatformArtistTrackRelation.ts +92 -0
- package/models/PlatformGenre.ts +194 -0
- package/models/PlatformTrack.ts +339 -0
- package/models/PlatformTrackGenreRelation.ts +86 -0
- package/models/PlatformUserAlbum.ts +152 -0
- package/models/PlatformUserAlbumTrack.ts +138 -0
- package/models/PlatformUserPlaylist.ts +260 -0
- package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
- package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
- package/models/PlatformUserPlaylistTrack.ts +162 -0
- package/models/PlaybackStatus.ts +47 -0
- package/models/PlaybackStatusType.ts +58 -0
- package/models/RadioShow.ts +233 -0
- package/models/RadioShowGenres.ts +107 -0
- package/models/RadioShowMedia.ts +181 -0
- package/models/RadioShowPlacement.ts +115 -0
- package/models/RadioShowPublishRequests.ts +86 -0
- package/models/RadioShowType.ts +66 -0
- package/models/State.ts +86 -0
- package/models/TrackDeletionReason.ts +58 -0
- package/models/UnmatchedAlbum.ts +66 -0
- package/models/UnmatchedArtist.ts +81 -0
- package/models/UserAbuseReports.ts +232 -0
- package/models/UserAffinity.ts +117 -0
- package/models/UserArtistAffinity.ts +136 -0
- package/models/UserBookmarks.ts +235 -0
- package/models/UserComments.ts +271 -0
- package/models/UserContacts.ts +155 -0
- package/models/UserEngagementFactor.ts +109 -0
- package/models/UserGenreAffinity.ts +136 -0
- package/models/UserLikes.ts +235 -0
- package/models/UserMessages.ts +189 -0
- package/models/Versus.ts +438 -0
- package/models/VersusAccessType.ts +66 -0
- package/models/VersusCoCreator.ts +111 -0
- package/models/VersusCreatorScope.ts +66 -0
- package/models/VersusEndMode.ts +66 -0
- package/models/VersusEndTimerDuration.ts +81 -0
- package/models/VersusEndVoteThreshold.ts +67 -0
- package/models/VersusEntityKind.ts +79 -0
- package/models/VersusOption.ts +258 -0
- package/models/VersusPublishIssue.ts +146 -0
- package/models/VersusQuestion.ts +123 -0
- package/models/VersusQuestionVariableType.ts +66 -0
- package/models/VersusVote.ts +99 -0
- package/models/VersusVotingListType.ts +66 -0
- package/models/VersusVotingMode.ts +66 -0
- package/models/index.ts +3 -0
- package/models/init-models.ts +1268 -0
- package/models/initDb.ts +72 -0
- package/models/rdsCaBundle.ts +5 -0
- package/package.json +2 -5
- package/scripts/generate-and-upload.mjs +123 -0
- package/scripts/update-rds-ca-bundle.mjs +44 -0
- package/tsconfig.json +52 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
4
|
+
|
|
5
|
+
export interface TrackDeletionReasonAttributes {
|
|
6
|
+
id: number;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type TrackDeletionReasonPk = "id";
|
|
11
|
+
export type TrackDeletionReasonId = TrackDeletionReason[TrackDeletionReasonPk];
|
|
12
|
+
export type TrackDeletionReasonCreationAttributes = TrackDeletionReasonAttributes;
|
|
13
|
+
|
|
14
|
+
export class TrackDeletionReason extends Model<TrackDeletionReasonAttributes, TrackDeletionReasonCreationAttributes> implements TrackDeletionReasonAttributes {
|
|
15
|
+
id!: number;
|
|
16
|
+
description!: string;
|
|
17
|
+
|
|
18
|
+
// TrackDeletionReason hasMany JukeboxQueueEntry via trackDeletionReasonId
|
|
19
|
+
jukeboxQueueEntries!: JukeboxQueueEntry[];
|
|
20
|
+
getJukeboxQueueEntries!: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
|
|
21
|
+
setJukeboxQueueEntries!: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
22
|
+
addJukeboxQueueEntry!: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
23
|
+
addJukeboxQueueEntries!: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
24
|
+
createJukeboxQueueEntry!: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
|
|
25
|
+
removeJukeboxQueueEntry!: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
26
|
+
removeJukeboxQueueEntries!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
27
|
+
hasJukeboxQueueEntry!: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
28
|
+
hasJukeboxQueueEntries!: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
29
|
+
countJukeboxQueueEntries!: Sequelize.HasManyCountAssociationsMixin;
|
|
30
|
+
|
|
31
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof TrackDeletionReason {
|
|
32
|
+
return TrackDeletionReason.init({
|
|
33
|
+
id: {
|
|
34
|
+
type: DataTypes.SMALLINT,
|
|
35
|
+
allowNull: false,
|
|
36
|
+
primaryKey: true
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
type: DataTypes.STRING(255),
|
|
40
|
+
allowNull: false
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
sequelize,
|
|
44
|
+
tableName: 'track_deletion_reason',
|
|
45
|
+
schema: 'eb',
|
|
46
|
+
timestamps: false,
|
|
47
|
+
indexes: [
|
|
48
|
+
{
|
|
49
|
+
name: "track_deletion_reason_pkey",
|
|
50
|
+
unique: true,
|
|
51
|
+
fields: [
|
|
52
|
+
{ name: "id" },
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
4
|
+
|
|
5
|
+
export interface UnmatchedAlbumAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
platformAlbumId: string;
|
|
8
|
+
createDate: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type UnmatchedAlbumPk = "id";
|
|
12
|
+
export type UnmatchedAlbumId = UnmatchedAlbum[UnmatchedAlbumPk];
|
|
13
|
+
export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
|
|
14
|
+
export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
|
|
15
|
+
|
|
16
|
+
export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
|
|
17
|
+
id!: string;
|
|
18
|
+
platformAlbumId!: string;
|
|
19
|
+
createDate!: Date;
|
|
20
|
+
|
|
21
|
+
// UnmatchedAlbum belongsTo PlatformAlbum via platformAlbumId
|
|
22
|
+
platformAlbum!: PlatformAlbum;
|
|
23
|
+
getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
|
|
24
|
+
setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
25
|
+
createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
|
|
26
|
+
|
|
27
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedAlbum {
|
|
28
|
+
return UnmatchedAlbum.init({
|
|
29
|
+
id: {
|
|
30
|
+
type: DataTypes.UUID,
|
|
31
|
+
allowNull: false,
|
|
32
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
33
|
+
primaryKey: true
|
|
34
|
+
},
|
|
35
|
+
platformAlbumId: {
|
|
36
|
+
type: DataTypes.UUID,
|
|
37
|
+
allowNull: false,
|
|
38
|
+
references: {
|
|
39
|
+
model: 'platform_album',
|
|
40
|
+
key: 'id'
|
|
41
|
+
},
|
|
42
|
+
field: 'platform_album_id'
|
|
43
|
+
},
|
|
44
|
+
createDate: {
|
|
45
|
+
type: DataTypes.DATE,
|
|
46
|
+
allowNull: false,
|
|
47
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
48
|
+
field: 'create_date'
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
sequelize,
|
|
52
|
+
tableName: 'unmatched_album',
|
|
53
|
+
schema: 'eb',
|
|
54
|
+
timestamps: false,
|
|
55
|
+
indexes: [
|
|
56
|
+
{
|
|
57
|
+
name: "unmatched_album_pkey",
|
|
58
|
+
unique: true,
|
|
59
|
+
fields: [
|
|
60
|
+
{ name: "id" },
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { Platform, PlatformId } from './Platform';
|
|
4
|
+
|
|
5
|
+
export interface UnmatchedArtistAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
platformId: number;
|
|
8
|
+
externalArtistId: number;
|
|
9
|
+
createDate: Date;
|
|
10
|
+
updateDate: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type UnmatchedArtistPk = "id";
|
|
14
|
+
export type UnmatchedArtistId = UnmatchedArtist[UnmatchedArtistPk];
|
|
15
|
+
export type UnmatchedArtistOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
16
|
+
export type UnmatchedArtistCreationAttributes = Optional<UnmatchedArtistAttributes, UnmatchedArtistOptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes> implements UnmatchedArtistAttributes {
|
|
19
|
+
id!: string;
|
|
20
|
+
platformId!: number;
|
|
21
|
+
externalArtistId!: number;
|
|
22
|
+
createDate!: Date;
|
|
23
|
+
updateDate!: Date;
|
|
24
|
+
|
|
25
|
+
// UnmatchedArtist belongsTo Platform via platformId
|
|
26
|
+
platform!: Platform;
|
|
27
|
+
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
28
|
+
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
29
|
+
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
30
|
+
|
|
31
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedArtist {
|
|
32
|
+
return UnmatchedArtist.init({
|
|
33
|
+
id: {
|
|
34
|
+
type: DataTypes.UUID,
|
|
35
|
+
allowNull: false,
|
|
36
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
37
|
+
primaryKey: true
|
|
38
|
+
},
|
|
39
|
+
platformId: {
|
|
40
|
+
type: DataTypes.SMALLINT,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
references: {
|
|
43
|
+
model: 'platform',
|
|
44
|
+
key: 'id'
|
|
45
|
+
},
|
|
46
|
+
field: 'platform_id'
|
|
47
|
+
},
|
|
48
|
+
externalArtistId: {
|
|
49
|
+
type: DataTypes.INTEGER,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
field: 'external_artist_id'
|
|
52
|
+
},
|
|
53
|
+
createDate: {
|
|
54
|
+
type: DataTypes.DATE,
|
|
55
|
+
allowNull: false,
|
|
56
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
57
|
+
field: 'create_date'
|
|
58
|
+
},
|
|
59
|
+
updateDate: {
|
|
60
|
+
type: DataTypes.DATE,
|
|
61
|
+
allowNull: false,
|
|
62
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
63
|
+
field: 'update_date'
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
sequelize,
|
|
67
|
+
tableName: 'unmatched_artist',
|
|
68
|
+
schema: 'eb',
|
|
69
|
+
timestamps: false,
|
|
70
|
+
indexes: [
|
|
71
|
+
{
|
|
72
|
+
name: "unmatched_artist_pkey",
|
|
73
|
+
unique: true,
|
|
74
|
+
fields: [
|
|
75
|
+
{ name: "id" },
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -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
|
+
id: string;
|
|
13
|
+
reporterUserId: string;
|
|
14
|
+
reportDate: Date;
|
|
15
|
+
updateDate: Date;
|
|
16
|
+
jukeboxId?: string;
|
|
17
|
+
jukeboxChatMessageId?: string;
|
|
18
|
+
radioShowId?: string;
|
|
19
|
+
radioShowMediaId?: string;
|
|
20
|
+
playlistId?: string;
|
|
21
|
+
versusThemeTextId?: string;
|
|
22
|
+
commentId?: string;
|
|
23
|
+
directMessageId?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type UserAbuseReportsPk = "id";
|
|
27
|
+
export type UserAbuseReportsId = UserAbuseReports[UserAbuseReportsPk];
|
|
28
|
+
export type UserAbuseReportsOptionalAttributes = "id" | "reportDate" | "updateDate" | "jukeboxId" | "jukeboxChatMessageId" | "radioShowId" | "radioShowMediaId" | "playlistId" | "versusThemeTextId" | "commentId" | "directMessageId";
|
|
29
|
+
export type UserAbuseReportsCreationAttributes = Optional<UserAbuseReportsAttributes, UserAbuseReportsOptionalAttributes>;
|
|
30
|
+
|
|
31
|
+
export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbuseReportsCreationAttributes> implements UserAbuseReportsAttributes {
|
|
32
|
+
id!: string;
|
|
33
|
+
reporterUserId!: string;
|
|
34
|
+
reportDate!: Date;
|
|
35
|
+
updateDate!: Date;
|
|
36
|
+
jukeboxId?: string;
|
|
37
|
+
jukeboxChatMessageId?: string;
|
|
38
|
+
radioShowId?: string;
|
|
39
|
+
radioShowMediaId?: string;
|
|
40
|
+
playlistId?: string;
|
|
41
|
+
versusThemeTextId?: string;
|
|
42
|
+
commentId?: string;
|
|
43
|
+
directMessageId?: string;
|
|
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
|
+
id: {
|
|
84
|
+
type: DataTypes.UUID,
|
|
85
|
+
allowNull: false,
|
|
86
|
+
defaultValue: DataTypes.UUIDV4,
|
|
87
|
+
primaryKey: true
|
|
88
|
+
},
|
|
89
|
+
reporterUserId: {
|
|
90
|
+
type: DataTypes.UUID,
|
|
91
|
+
allowNull: false,
|
|
92
|
+
references: {
|
|
93
|
+
model: 'app_user',
|
|
94
|
+
key: 'id'
|
|
95
|
+
},
|
|
96
|
+
field: 'reporter_user_id'
|
|
97
|
+
},
|
|
98
|
+
reportDate: {
|
|
99
|
+
type: DataTypes.DATE,
|
|
100
|
+
allowNull: false,
|
|
101
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
102
|
+
field: 'report_date'
|
|
103
|
+
},
|
|
104
|
+
updateDate: {
|
|
105
|
+
type: DataTypes.DATE,
|
|
106
|
+
allowNull: false,
|
|
107
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
108
|
+
field: 'update_date'
|
|
109
|
+
},
|
|
110
|
+
jukeboxId: {
|
|
111
|
+
type: DataTypes.UUID,
|
|
112
|
+
allowNull: true,
|
|
113
|
+
references: {
|
|
114
|
+
model: 'jukebox_session',
|
|
115
|
+
key: 'id'
|
|
116
|
+
},
|
|
117
|
+
field: 'jukebox_id'
|
|
118
|
+
},
|
|
119
|
+
jukeboxChatMessageId: {
|
|
120
|
+
type: DataTypes.STRING(50),
|
|
121
|
+
allowNull: true,
|
|
122
|
+
field: 'jukebox_chat_message_id'
|
|
123
|
+
},
|
|
124
|
+
radioShowId: {
|
|
125
|
+
type: DataTypes.UUID,
|
|
126
|
+
allowNull: true,
|
|
127
|
+
references: {
|
|
128
|
+
model: 'radio_show',
|
|
129
|
+
key: 'id'
|
|
130
|
+
},
|
|
131
|
+
field: 'radio_show_id'
|
|
132
|
+
},
|
|
133
|
+
radioShowMediaId: {
|
|
134
|
+
type: DataTypes.UUID,
|
|
135
|
+
allowNull: true,
|
|
136
|
+
references: {
|
|
137
|
+
model: 'radio_show_media',
|
|
138
|
+
key: 'id'
|
|
139
|
+
},
|
|
140
|
+
field: 'radio_show_media_id'
|
|
141
|
+
},
|
|
142
|
+
playlistId: {
|
|
143
|
+
type: DataTypes.UUID,
|
|
144
|
+
allowNull: true,
|
|
145
|
+
references: {
|
|
146
|
+
model: 'platform_user_playlist',
|
|
147
|
+
key: 'id'
|
|
148
|
+
},
|
|
149
|
+
field: 'playlist_id'
|
|
150
|
+
},
|
|
151
|
+
versusThemeTextId: {
|
|
152
|
+
type: DataTypes.UUID,
|
|
153
|
+
allowNull: true,
|
|
154
|
+
field: 'versus_theme_text_id'
|
|
155
|
+
},
|
|
156
|
+
commentId: {
|
|
157
|
+
type: DataTypes.UUID,
|
|
158
|
+
allowNull: true,
|
|
159
|
+
references: {
|
|
160
|
+
model: 'user_comments',
|
|
161
|
+
key: 'id'
|
|
162
|
+
},
|
|
163
|
+
field: 'comment_id'
|
|
164
|
+
},
|
|
165
|
+
directMessageId: {
|
|
166
|
+
type: DataTypes.UUID,
|
|
167
|
+
allowNull: true,
|
|
168
|
+
references: {
|
|
169
|
+
model: 'user_messages',
|
|
170
|
+
key: 'id'
|
|
171
|
+
},
|
|
172
|
+
field: 'direct_message_id'
|
|
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
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AffinityRelationshipType, AffinityRelationshipTypeId } from './AffinityRelationshipType';
|
|
4
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
5
|
+
|
|
6
|
+
export interface UserAffinityAttributes {
|
|
7
|
+
id: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
affinityRelationshipTypeId: string;
|
|
10
|
+
relatedId: string;
|
|
11
|
+
createDate?: Date;
|
|
12
|
+
updateDate?: Date;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type UserAffinityPk = "id";
|
|
16
|
+
export type UserAffinityId = UserAffinity[UserAffinityPk];
|
|
17
|
+
export type UserAffinityOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
18
|
+
export type UserAffinityCreationAttributes = Optional<UserAffinityAttributes, UserAffinityOptionalAttributes>;
|
|
19
|
+
|
|
20
|
+
export class UserAffinity extends Model<UserAffinityAttributes, UserAffinityCreationAttributes> implements UserAffinityAttributes {
|
|
21
|
+
id!: string;
|
|
22
|
+
userId!: string;
|
|
23
|
+
affinityRelationshipTypeId!: string;
|
|
24
|
+
relatedId!: string;
|
|
25
|
+
createDate?: Date;
|
|
26
|
+
updateDate?: Date;
|
|
27
|
+
|
|
28
|
+
// UserAffinity belongsTo AffinityRelationshipType via affinityRelationshipTypeId
|
|
29
|
+
affinityRelationshipType!: AffinityRelationshipType;
|
|
30
|
+
getAffinityRelationshipType!: Sequelize.BelongsToGetAssociationMixin<AffinityRelationshipType>;
|
|
31
|
+
setAffinityRelationshipType!: Sequelize.BelongsToSetAssociationMixin<AffinityRelationshipType, AffinityRelationshipTypeId>;
|
|
32
|
+
createAffinityRelationshipType!: Sequelize.BelongsToCreateAssociationMixin<AffinityRelationshipType>;
|
|
33
|
+
// UserAffinity belongsTo AppUser via userId
|
|
34
|
+
user!: AppUser;
|
|
35
|
+
getUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
36
|
+
setUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
37
|
+
createUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
38
|
+
|
|
39
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserAffinity {
|
|
40
|
+
return UserAffinity.init({
|
|
41
|
+
id: {
|
|
42
|
+
type: DataTypes.UUID,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
defaultValue: DataTypes.UUIDV4,
|
|
45
|
+
primaryKey: true
|
|
46
|
+
},
|
|
47
|
+
userId: {
|
|
48
|
+
type: DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
references: {
|
|
51
|
+
model: 'app_user',
|
|
52
|
+
key: 'id'
|
|
53
|
+
},
|
|
54
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
55
|
+
field: 'user_id'
|
|
56
|
+
},
|
|
57
|
+
affinityRelationshipTypeId: {
|
|
58
|
+
type: DataTypes.UUID,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
references: {
|
|
61
|
+
model: 'affinity_relationship_type',
|
|
62
|
+
key: 'id'
|
|
63
|
+
},
|
|
64
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
65
|
+
field: 'affinity_relationship_type_id'
|
|
66
|
+
},
|
|
67
|
+
relatedId: {
|
|
68
|
+
type: DataTypes.UUID,
|
|
69
|
+
allowNull: false,
|
|
70
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
71
|
+
field: 'related_id'
|
|
72
|
+
},
|
|
73
|
+
createDate: {
|
|
74
|
+
type: DataTypes.DATE,
|
|
75
|
+
allowNull: true,
|
|
76
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
77
|
+
field: 'create_date'
|
|
78
|
+
},
|
|
79
|
+
updateDate: {
|
|
80
|
+
type: DataTypes.DATE,
|
|
81
|
+
allowNull: true,
|
|
82
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
83
|
+
field: 'update_date'
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
sequelize,
|
|
87
|
+
tableName: 'user_affinity',
|
|
88
|
+
schema: 'eb',
|
|
89
|
+
timestamps: false,
|
|
90
|
+
indexes: [
|
|
91
|
+
{
|
|
92
|
+
name: "user_affinity_pkey",
|
|
93
|
+
unique: true,
|
|
94
|
+
fields: [
|
|
95
|
+
{ name: "id" },
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "user_affinity_user_id_affinity_relationship_type_id_index",
|
|
100
|
+
fields: [
|
|
101
|
+
{ name: "user_id" },
|
|
102
|
+
{ name: "affinity_relationship_type_id" },
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
107
|
+
unique: true,
|
|
108
|
+
fields: [
|
|
109
|
+
{ name: "user_id" },
|
|
110
|
+
{ name: "affinity_relationship_type_id" },
|
|
111
|
+
{ name: "related_id" },
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AffinityTier, AffinityTierId } from './AffinityTier';
|
|
4
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
5
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
6
|
+
|
|
7
|
+
export interface UserArtistAffinityAttributes {
|
|
8
|
+
id: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
canonArtistId: string;
|
|
11
|
+
affinityTierId: number;
|
|
12
|
+
rank: number;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type UserArtistAffinityPk = "id";
|
|
18
|
+
export type UserArtistAffinityId = UserArtistAffinity[UserArtistAffinityPk];
|
|
19
|
+
export type UserArtistAffinityOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
20
|
+
export type UserArtistAffinityCreationAttributes = Optional<UserArtistAffinityAttributes, UserArtistAffinityOptionalAttributes>;
|
|
21
|
+
|
|
22
|
+
export class UserArtistAffinity extends Model<UserArtistAffinityAttributes, UserArtistAffinityCreationAttributes> implements UserArtistAffinityAttributes {
|
|
23
|
+
id!: string;
|
|
24
|
+
userId!: string;
|
|
25
|
+
canonArtistId!: string;
|
|
26
|
+
affinityTierId!: number;
|
|
27
|
+
rank!: number;
|
|
28
|
+
createdAt!: Date;
|
|
29
|
+
updatedAt!: Date;
|
|
30
|
+
|
|
31
|
+
// UserArtistAffinity belongsTo AffinityTier via affinityTierId
|
|
32
|
+
affinityTier!: AffinityTier;
|
|
33
|
+
getAffinityTier!: Sequelize.BelongsToGetAssociationMixin<AffinityTier>;
|
|
34
|
+
setAffinityTier!: Sequelize.BelongsToSetAssociationMixin<AffinityTier, AffinityTierId>;
|
|
35
|
+
createAffinityTier!: Sequelize.BelongsToCreateAssociationMixin<AffinityTier>;
|
|
36
|
+
// UserArtistAffinity belongsTo AppUser via userId
|
|
37
|
+
user!: AppUser;
|
|
38
|
+
getUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
39
|
+
setUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
40
|
+
createUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
41
|
+
// UserArtistAffinity belongsTo CanonArtist via canonArtistId
|
|
42
|
+
canonArtist!: CanonArtist;
|
|
43
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
44
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
45
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
46
|
+
|
|
47
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserArtistAffinity {
|
|
48
|
+
return UserArtistAffinity.init({
|
|
49
|
+
id: {
|
|
50
|
+
type: DataTypes.UUID,
|
|
51
|
+
allowNull: false,
|
|
52
|
+
defaultValue: DataTypes.UUIDV4,
|
|
53
|
+
primaryKey: true
|
|
54
|
+
},
|
|
55
|
+
userId: {
|
|
56
|
+
type: DataTypes.UUID,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
references: {
|
|
59
|
+
model: 'app_user',
|
|
60
|
+
key: 'id'
|
|
61
|
+
},
|
|
62
|
+
unique: "user_artist_affinity_user_id_canon_artist_id_unique",
|
|
63
|
+
field: 'user_id'
|
|
64
|
+
},
|
|
65
|
+
canonArtistId: {
|
|
66
|
+
type: DataTypes.UUID,
|
|
67
|
+
allowNull: false,
|
|
68
|
+
references: {
|
|
69
|
+
model: 'canon_artist',
|
|
70
|
+
key: 'id'
|
|
71
|
+
},
|
|
72
|
+
unique: "user_artist_affinity_user_id_canon_artist_id_unique",
|
|
73
|
+
field: 'canon_artist_id'
|
|
74
|
+
},
|
|
75
|
+
affinityTierId: {
|
|
76
|
+
type: DataTypes.SMALLINT,
|
|
77
|
+
allowNull: false,
|
|
78
|
+
references: {
|
|
79
|
+
model: 'affinity_tier',
|
|
80
|
+
key: 'id'
|
|
81
|
+
},
|
|
82
|
+
field: 'affinity_tier_id'
|
|
83
|
+
},
|
|
84
|
+
rank: {
|
|
85
|
+
type: DataTypes.INTEGER,
|
|
86
|
+
allowNull: false
|
|
87
|
+
},
|
|
88
|
+
createdAt: {
|
|
89
|
+
type: DataTypes.DATE,
|
|
90
|
+
allowNull: false,
|
|
91
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
92
|
+
field: 'created_at'
|
|
93
|
+
},
|
|
94
|
+
updatedAt: {
|
|
95
|
+
type: DataTypes.DATE,
|
|
96
|
+
allowNull: false,
|
|
97
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
98
|
+
field: 'updated_at'
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
sequelize,
|
|
102
|
+
tableName: 'user_artist_affinity',
|
|
103
|
+
schema: 'eb',
|
|
104
|
+
timestamps: false,
|
|
105
|
+
indexes: [
|
|
106
|
+
{
|
|
107
|
+
name: "idx_user_artist_affinity_artist",
|
|
108
|
+
fields: [
|
|
109
|
+
{ name: "canon_artist_id" },
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "idx_user_artist_affinity_session",
|
|
114
|
+
fields: [
|
|
115
|
+
{ name: "user_id" },
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "user_artist_affinity_pkey",
|
|
120
|
+
unique: true,
|
|
121
|
+
fields: [
|
|
122
|
+
{ name: "id" },
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "user_artist_affinity_user_id_canon_artist_id_unique",
|
|
127
|
+
unique: true,
|
|
128
|
+
fields: [
|
|
129
|
+
{ name: "user_id" },
|
|
130
|
+
{ name: "canon_artist_id" },
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|