@earbug/db-models 0.0.59 → 0.0.62
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/AffinityRelationshipType.d.ts +2 -2
- package/dist/AffinityRelationshipType.js +6 -6
- package/dist/AppUser.d.ts +5 -5
- package/dist/AppUser.js +7 -7
- package/dist/AppUserDevice.d.ts +2 -2
- package/dist/AppUserDevice.js +6 -6
- package/dist/AppUserDeviceClassicBackup20260906.d.ts +23 -0
- package/dist/AppUserDeviceClassicBackup20260906.js +46 -0
- package/dist/AppUserFollowRelation.d.ts +3 -3
- package/dist/AppUserFollowRelation.js +6 -6
- package/dist/AppUserPlatformRelation.d.ts +13 -13
- package/dist/AppUserPlatformRelation.js +25 -25
- package/dist/CanonAlbum.d.ts +5 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonArtist.d.ts +5 -5
- package/dist/CanonArtist.js +11 -11
- package/dist/CanonGenre.d.ts +3 -3
- package/dist/CanonGenre.js +6 -6
- package/dist/CanonLabel.d.ts +2 -2
- package/dist/CanonLabel.js +6 -6
- package/dist/CanonMember.d.ts +3 -3
- package/dist/CanonMember.js +6 -6
- package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
- package/dist/CanonMemberExternalReferenceRelation.js +5 -5
- package/dist/CanonTrack.d.ts +5 -5
- package/dist/CanonTrack.js +11 -11
- package/dist/ConfigParam.d.ts +2 -2
- package/dist/ConfigParam.js +5 -5
- package/dist/ExternalReference.d.ts +2 -2
- package/dist/ExternalReference.js +5 -5
- package/dist/FeedContentType.d.ts +2 -2
- package/dist/FeedContentType.js +4 -4
- package/dist/GuestUser.d.ts +5 -5
- package/dist/GuestUser.js +13 -13
- package/dist/JukeboxAccessType.d.ts +2 -2
- package/dist/JukeboxAccessType.js +4 -4
- package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
- package/dist/JukeboxCanonGenreRelation.js +6 -6
- package/dist/JukeboxInvite.d.ts +3 -3
- package/dist/JukeboxInvite.js +6 -6
- package/dist/JukeboxQueueEntry.d.ts +9 -9
- package/dist/JukeboxQueueEntry.js +25 -25
- package/dist/JukeboxQueueMode.d.ts +2 -2
- package/dist/JukeboxQueueMode.js +4 -4
- package/dist/JukeboxSession.d.ts +9 -9
- package/dist/JukeboxSession.js +20 -20
- package/dist/JukeboxSessionArtistAffinity.d.ts +2 -2
- package/dist/JukeboxSessionArtistAffinity.js +6 -6
- package/dist/JukeboxSessionGenreAffinity.d.ts +2 -2
- package/dist/JukeboxSessionGenreAffinity.js +6 -6
- package/dist/JukeboxTerminationCondition.d.ts +2 -2
- package/dist/JukeboxTerminationCondition.js +4 -4
- package/dist/JukeboxType.d.ts +2 -2
- package/dist/JukeboxType.js +4 -4
- package/dist/JukeboxUser.d.ts +7 -7
- package/dist/JukeboxUser.js +20 -20
- package/dist/KnexMigrations.d.ts +3 -3
- package/dist/KnexMigrations.js +6 -6
- package/dist/KnexMigrationsLock.d.ts +3 -3
- package/dist/KnexMigrationsLock.js +5 -5
- package/dist/MerchItem.d.ts +3 -3
- package/dist/MerchItem.js +6 -6
- package/dist/MerchOrchestration.d.ts +3 -3
- package/dist/MerchOrchestration.js +6 -6
- package/dist/MerchPlatform.d.ts +2 -2
- package/dist/MerchPlatform.js +6 -6
- package/dist/MerchType.d.ts +2 -2
- package/dist/MerchType.js +4 -4
- package/dist/MetricsDaily.d.ts +3 -3
- package/dist/MetricsDaily.js +4 -4
- package/dist/NewsSite.d.ts +3 -3
- package/dist/NewsSite.js +6 -6
- package/dist/Notification.d.ts +13 -13
- package/dist/Notification.js +33 -33
- package/dist/Platform.d.ts +2 -2
- package/dist/Platform.js +7 -7
- package/dist/PlatformAlbum.d.ts +5 -5
- package/dist/PlatformAlbum.js +10 -10
- package/dist/PlatformArtist.d.ts +5 -5
- package/dist/PlatformArtist.js +10 -10
- package/dist/PlatformGenre.d.ts +2 -2
- package/dist/PlatformGenre.js +6 -6
- package/dist/PlatformTrack.d.ts +3 -3
- package/dist/PlatformTrack.js +6 -6
- package/dist/PlatformUserAlbum.d.ts +2 -2
- package/dist/PlatformUserAlbum.js +6 -6
- package/dist/PlatformUserAlbumTrack.d.ts +4 -4
- package/dist/PlatformUserAlbumTrack.js +11 -11
- package/dist/PlatformUserPlaylist.d.ts +5 -5
- package/dist/PlatformUserPlaylist.js +11 -11
- package/dist/PlatformUserPlaylistArtistAffinity.d.ts +4 -4
- package/dist/PlatformUserPlaylistArtistAffinity.js +12 -12
- package/dist/PlatformUserPlaylistGenreAffinity.d.ts +2 -2
- package/dist/PlatformUserPlaylistGenreAffinity.js +6 -6
- package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
- package/dist/PlatformUserPlaylistTrack.js +17 -17
- package/dist/PlaybackStatus.d.ts +2 -2
- package/dist/PlaybackStatus.js +4 -4
- package/dist/RadioShow.d.ts +3 -3
- package/dist/RadioShow.js +6 -6
- package/dist/RadioShowMedia.d.ts +3 -3
- package/dist/RadioShowMedia.js +6 -6
- package/dist/RadioShowPlacement.d.ts +3 -3
- package/dist/RadioShowPlacement.js +6 -6
- package/dist/RadioShowPublishRequests.d.ts +3 -3
- package/dist/RadioShowPublishRequests.js +6 -6
- package/dist/State.d.ts +2 -2
- package/dist/State.js +4 -4
- package/dist/UnmatchedAlbum.d.ts +2 -2
- package/dist/UnmatchedAlbum.js +6 -6
- package/dist/UnmatchedArtist.d.ts +2 -2
- package/dist/UnmatchedArtist.js +6 -6
- package/dist/UserAbuseReports.d.ts +7 -7
- package/dist/UserAbuseReports.js +18 -18
- package/dist/UserAffinity.d.ts +2 -2
- package/dist/UserAffinity.js +6 -6
- package/dist/UserArtistAffinity.d.ts +2 -2
- package/dist/UserArtistAffinity.js +6 -6
- package/dist/UserBookmarks.d.ts +3 -3
- package/dist/UserBookmarks.js +6 -6
- package/dist/UserComments.d.ts +5 -5
- package/dist/UserComments.js +12 -12
- package/dist/UserContacts.d.ts +3 -3
- package/dist/UserContacts.js +7 -7
- package/dist/UserEngagementFactor.d.ts +2 -2
- package/dist/UserEngagementFactor.js +6 -6
- package/dist/UserGenreAffinity.d.ts +2 -2
- package/dist/UserGenreAffinity.js +6 -6
- package/dist/UserLikes.d.ts +3 -3
- package/dist/UserLikes.js +6 -6
- package/dist/UserMessages.d.ts +5 -5
- package/dist/UserMessages.js +15 -15
- package/dist/Versus.d.ts +5 -5
- package/dist/Versus.js +11 -11
- package/dist/VersusCoCreator.d.ts +4 -4
- package/dist/VersusCoCreator.js +12 -12
- package/dist/VersusOption.d.ts +3 -3
- package/dist/VersusOption.js +6 -6
- package/dist/VersusPublishIssue.d.ts +3 -3
- package/dist/VersusPublishIssue.js +6 -6
- package/dist/VersusQuestion.d.ts +2 -2
- package/dist/VersusQuestion.js +6 -6
- package/dist/VersusVote.d.ts +2 -2
- package/dist/VersusVote.js +6 -6
- package/dist/init-models.d.ts +349 -3
- package/dist/init-models.js +905 -1
- package/package.json +5 -2
- package/.github/workflows/publish.yaml +0 -56
- package/.nvmrc +0 -1
- package/dist/CanonAlbumImageHarvested.d.ts +0 -30
- package/dist/CanonAlbumImageHarvested.js +0 -70
- package/dist/CanonArtistImageHarvested.d.ts +0 -30
- package/dist/CanonArtistImageHarvested.js +0 -70
- package/model_options.json +0 -3
- package/models/AccessControlPreference.ts +0 -53
- package/models/AffinityRelationshipType.ts +0 -96
- package/models/AffinityTier.ts +0 -131
- package/models/AppUser.ts +0 -577
- package/models/AppUserDevice.ts +0 -101
- package/models/AppUserFollowRelation.ts +0 -128
- package/models/AppUserPlatformRelation.ts +0 -150
- package/models/CanonAlbum.ts +0 -229
- package/models/CanonAlbumExternalReferenceRelation.ts +0 -92
- package/models/CanonAlbumGenreRelation.ts +0 -86
- package/models/CanonAlbumImageHarvested.ts +0 -98
- package/models/CanonAlbumLabelRelation.ts +0 -86
- package/models/CanonAlbumTrackRelation.ts +0 -92
- package/models/CanonArtist.ts +0 -356
- package/models/CanonArtistAlbumRelation.ts +0 -92
- package/models/CanonArtistExternalReferenceRelation.ts +0 -92
- package/models/CanonArtistGenreRelation.ts +0 -86
- package/models/CanonArtistImageHarvested.ts +0 -98
- package/models/CanonArtistMemberRelation.ts +0 -86
- package/models/CanonArtistTrackRelation.ts +0 -92
- package/models/CanonGenre.ts +0 -273
- package/models/CanonGenreExternalReferenceRelation.ts +0 -92
- package/models/CanonLabel.ts +0 -129
- package/models/CanonLabelExternalReferenceRelation.ts +0 -92
- package/models/CanonMember.ts +0 -130
- package/models/CanonMemberExternalReferenceRelation.ts +0 -99
- package/models/CanonToPlatformAlbumRelation.ts +0 -92
- package/models/CanonToPlatformArtistRelation.ts +0 -92
- package/models/CanonToPlatformGenreRelation.ts +0 -86
- package/models/CanonToPlatformTrackRelation.ts +0 -92
- package/models/CanonTrack.ts +0 -232
- package/models/ConfigParam.ts +0 -62
- package/models/ExternalReference.ts +0 -201
- package/models/FeedConfig.ts +0 -65
- package/models/FeedContentType.ts +0 -124
- package/models/GuestUser.ts +0 -137
- package/models/JukeboxAccessType.ts +0 -60
- package/models/JukeboxCanonGenreRelation.ts +0 -108
- package/models/JukeboxInvite.ts +0 -125
- package/models/JukeboxQueueEntry.ts +0 -247
- package/models/JukeboxQueueMode.ts +0 -60
- package/models/JukeboxSession.ts +0 -334
- package/models/JukeboxSessionArtistAffinity.ts +0 -136
- package/models/JukeboxSessionGenreAffinity.ts +0 -136
- package/models/JukeboxStatus.ts +0 -58
- package/models/JukeboxTerminationCondition.ts +0 -60
- package/models/JukeboxType.ts +0 -60
- package/models/JukeboxUser.ts +0 -182
- package/models/JukeboxUserType.ts +0 -58
- package/models/KnexMigrations.ts +0 -60
- package/models/KnexMigrationsLock.ts +0 -48
- package/models/MerchItem.ts +0 -198
- package/models/MerchOrchestration.ts +0 -130
- package/models/MerchPlatform.ts +0 -95
- package/models/MerchType.ts +0 -89
- package/models/MetricsDaily.ts +0 -79
- package/models/MetricsEvent.ts +0 -124
- package/models/NewsArticle.ts +0 -177
- package/models/NewsPlatform.ts +0 -76
- package/models/NewsSite.ts +0 -75
- package/models/Notification.ts +0 -214
- package/models/NotificationType.ts +0 -66
- package/models/PauseStatusType.ts +0 -58
- package/models/Platform.ts +0 -189
- package/models/PlatformAlbum.ts +0 -398
- package/models/PlatformAlbumGenreRelation.ts +0 -86
- package/models/PlatformAlbumTrackRelation.ts +0 -92
- package/models/PlatformArtist.ts +0 -358
- package/models/PlatformArtistAlbumRelation.ts +0 -92
- package/models/PlatformArtistGenreRelation.ts +0 -86
- package/models/PlatformArtistTrackRelation.ts +0 -92
- package/models/PlatformGenre.ts +0 -194
- package/models/PlatformTrack.ts +0 -339
- package/models/PlatformTrackGenreRelation.ts +0 -86
- package/models/PlatformUserAlbum.ts +0 -152
- package/models/PlatformUserAlbumTrack.ts +0 -138
- package/models/PlatformUserPlaylist.ts +0 -260
- package/models/PlatformUserPlaylistArtistAffinity.ts +0 -136
- package/models/PlatformUserPlaylistGenreAffinity.ts +0 -136
- package/models/PlatformUserPlaylistTrack.ts +0 -162
- package/models/PlaybackStatus.ts +0 -47
- package/models/PlaybackStatusType.ts +0 -58
- package/models/RadioShow.ts +0 -209
- package/models/RadioShowGenres.ts +0 -107
- package/models/RadioShowMedia.ts +0 -181
- package/models/RadioShowPlacement.ts +0 -115
- package/models/RadioShowPublishRequests.ts +0 -86
- package/models/State.ts +0 -86
- package/models/TrackDeletionReason.ts +0 -58
- package/models/UnmatchedAlbum.ts +0 -66
- package/models/UnmatchedArtist.ts +0 -81
- package/models/UserAbuseReports.ts +0 -232
- package/models/UserAffinity.ts +0 -117
- package/models/UserArtistAffinity.ts +0 -136
- package/models/UserBookmarks.ts +0 -235
- package/models/UserComments.ts +0 -271
- package/models/UserContacts.ts +0 -155
- package/models/UserEngagementFactor.ts +0 -109
- package/models/UserGenreAffinity.ts +0 -136
- package/models/UserLikes.ts +0 -235
- package/models/UserMessages.ts +0 -189
- package/models/Versus.ts +0 -438
- package/models/VersusAccessType.ts +0 -66
- package/models/VersusCoCreator.ts +0 -111
- package/models/VersusCreatorScope.ts +0 -66
- package/models/VersusEndMode.ts +0 -66
- package/models/VersusEndTimerDuration.ts +0 -81
- package/models/VersusEndVoteThreshold.ts +0 -67
- package/models/VersusEntityKind.ts +0 -79
- package/models/VersusOption.ts +0 -258
- package/models/VersusPublishIssue.ts +0 -146
- package/models/VersusQuestion.ts +0 -123
- package/models/VersusQuestionVariableType.ts +0 -66
- package/models/VersusVote.ts +0 -99
- package/models/VersusVotingListType.ts +0 -66
- package/models/VersusVotingMode.ts +0 -66
- package/models/index.ts +0 -3
- package/models/init-models.ts +0 -14
- package/models/initDb.ts +0 -72
- package/models/rdsCaBundle.ts +0 -5
- package/scripts/update-rds-ca-bundle.mjs +0 -44
- package/tsconfig.json +0 -52
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
-
import type { Platform, PlatformId } from './Platform';
|
|
5
|
-
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
6
|
-
import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
|
|
7
|
-
|
|
8
|
-
export interface PlatformUserAlbumAttributes {
|
|
9
|
-
appUserId: string;
|
|
10
|
-
platformId: number;
|
|
11
|
-
externalUserAlbumId: string;
|
|
12
|
-
platformAlbumId: string;
|
|
13
|
-
id: string;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
stateId: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type PlatformUserAlbumPk = "id";
|
|
20
|
-
export type PlatformUserAlbumId = PlatformUserAlbum[PlatformUserAlbumPk];
|
|
21
|
-
export type PlatformUserAlbumOptionalAttributes = "id" | "createdAt" | "updatedAt" | "stateId";
|
|
22
|
-
export type PlatformUserAlbumCreationAttributes = Optional<PlatformUserAlbumAttributes, PlatformUserAlbumOptionalAttributes>;
|
|
23
|
-
|
|
24
|
-
export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes> implements PlatformUserAlbumAttributes {
|
|
25
|
-
appUserId!: string;
|
|
26
|
-
platformId!: number;
|
|
27
|
-
externalUserAlbumId!: string;
|
|
28
|
-
platformAlbumId!: string;
|
|
29
|
-
id!: string;
|
|
30
|
-
createdAt!: Date;
|
|
31
|
-
updatedAt!: Date;
|
|
32
|
-
stateId!: number;
|
|
33
|
-
|
|
34
|
-
// PlatformUserAlbum belongsTo AppUser via appUserId
|
|
35
|
-
appUser!: AppUser;
|
|
36
|
-
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
37
|
-
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
38
|
-
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
39
|
-
// PlatformUserAlbum belongsTo Platform via platformId
|
|
40
|
-
platform!: Platform;
|
|
41
|
-
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
42
|
-
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
43
|
-
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
44
|
-
// PlatformUserAlbum belongsTo PlatformAlbum via platformAlbumId
|
|
45
|
-
platformAlbum!: PlatformAlbum;
|
|
46
|
-
getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
|
|
47
|
-
setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
48
|
-
createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
|
|
49
|
-
// PlatformUserAlbum hasMany PlatformUserAlbumTrack via platformUserAlbumId
|
|
50
|
-
platformUserAlbumTracks!: PlatformUserAlbumTrack[];
|
|
51
|
-
getPlatformUserAlbumTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbumTrack>;
|
|
52
|
-
setPlatformUserAlbumTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
53
|
-
addPlatformUserAlbumTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
54
|
-
addPlatformUserAlbumTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
55
|
-
createPlatformUserAlbumTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbumTrack>;
|
|
56
|
-
removePlatformUserAlbumTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
57
|
-
removePlatformUserAlbumTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
58
|
-
hasPlatformUserAlbumTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
59
|
-
hasPlatformUserAlbumTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
|
|
60
|
-
countPlatformUserAlbumTracks!: Sequelize.HasManyCountAssociationsMixin;
|
|
61
|
-
|
|
62
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbum {
|
|
63
|
-
return PlatformUserAlbum.init({
|
|
64
|
-
appUserId: {
|
|
65
|
-
type: DataTypes.UUID,
|
|
66
|
-
allowNull: false,
|
|
67
|
-
references: {
|
|
68
|
-
model: 'app_user',
|
|
69
|
-
key: 'id'
|
|
70
|
-
},
|
|
71
|
-
unique: "platform_user_album_app_user_id_platform_album_id_unique",
|
|
72
|
-
field: 'app_user_id'
|
|
73
|
-
},
|
|
74
|
-
platformId: {
|
|
75
|
-
type: DataTypes.SMALLINT,
|
|
76
|
-
allowNull: false,
|
|
77
|
-
references: {
|
|
78
|
-
model: 'platform',
|
|
79
|
-
key: 'id'
|
|
80
|
-
},
|
|
81
|
-
field: 'platform_id'
|
|
82
|
-
},
|
|
83
|
-
externalUserAlbumId: {
|
|
84
|
-
type: DataTypes.STRING(255),
|
|
85
|
-
allowNull: false,
|
|
86
|
-
field: 'external_user_album_id'
|
|
87
|
-
},
|
|
88
|
-
platformAlbumId: {
|
|
89
|
-
type: DataTypes.UUID,
|
|
90
|
-
allowNull: false,
|
|
91
|
-
references: {
|
|
92
|
-
model: 'platform_album',
|
|
93
|
-
key: 'id'
|
|
94
|
-
},
|
|
95
|
-
unique: "platform_user_album_app_user_id_platform_album_id_unique",
|
|
96
|
-
field: 'platform_album_id'
|
|
97
|
-
},
|
|
98
|
-
id: {
|
|
99
|
-
type: DataTypes.UUID,
|
|
100
|
-
allowNull: false,
|
|
101
|
-
defaultValue: DataTypes.UUIDV4,
|
|
102
|
-
primaryKey: true
|
|
103
|
-
},
|
|
104
|
-
createdAt: {
|
|
105
|
-
type: DataTypes.DATE,
|
|
106
|
-
allowNull: false,
|
|
107
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
108
|
-
field: 'created_at'
|
|
109
|
-
},
|
|
110
|
-
updatedAt: {
|
|
111
|
-
type: DataTypes.DATE,
|
|
112
|
-
allowNull: false,
|
|
113
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
114
|
-
field: 'updated_at'
|
|
115
|
-
},
|
|
116
|
-
stateId: {
|
|
117
|
-
type: DataTypes.SMALLINT,
|
|
118
|
-
allowNull: false,
|
|
119
|
-
defaultValue: 0,
|
|
120
|
-
field: 'state_id'
|
|
121
|
-
}
|
|
122
|
-
}, {
|
|
123
|
-
sequelize,
|
|
124
|
-
tableName: 'platform_user_album',
|
|
125
|
-
schema: 'eb',
|
|
126
|
-
timestamps: false,
|
|
127
|
-
indexes: [
|
|
128
|
-
{
|
|
129
|
-
name: "platform_user_album_app_user_id_index",
|
|
130
|
-
fields: [
|
|
131
|
-
{ name: "app_user_id" },
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
name: "platform_user_album_app_user_id_platform_album_id_unique",
|
|
136
|
-
unique: true,
|
|
137
|
-
fields: [
|
|
138
|
-
{ name: "app_user_id" },
|
|
139
|
-
{ name: "platform_album_id" },
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: "platform_user_album_pkey",
|
|
144
|
-
unique: true,
|
|
145
|
-
fields: [
|
|
146
|
-
{ name: "id" },
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
]
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { Platform, PlatformId } from './Platform';
|
|
4
|
-
import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
5
|
-
import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
|
|
6
|
-
|
|
7
|
-
export interface PlatformUserAlbumTrackAttributes {
|
|
8
|
-
platformUserAlbumId: string;
|
|
9
|
-
platformId: number;
|
|
10
|
-
externalUserAlbumTrackId: string;
|
|
11
|
-
platformTrackId: string;
|
|
12
|
-
stateId: number;
|
|
13
|
-
id: string;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type PlatformUserAlbumTrackPk = "id";
|
|
19
|
-
export type PlatformUserAlbumTrackId = PlatformUserAlbumTrack[PlatformUserAlbumTrackPk];
|
|
20
|
-
export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
21
|
-
export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
|
|
22
|
-
|
|
23
|
-
export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
|
|
24
|
-
platformUserAlbumId!: string;
|
|
25
|
-
platformId!: number;
|
|
26
|
-
externalUserAlbumTrackId!: string;
|
|
27
|
-
platformTrackId!: string;
|
|
28
|
-
stateId!: number;
|
|
29
|
-
id!: string;
|
|
30
|
-
createdAt!: Date;
|
|
31
|
-
updatedAt!: Date;
|
|
32
|
-
|
|
33
|
-
// PlatformUserAlbumTrack belongsTo Platform via platformId
|
|
34
|
-
platform!: Platform;
|
|
35
|
-
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
36
|
-
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
37
|
-
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
38
|
-
// PlatformUserAlbumTrack belongsTo PlatformTrack via platformTrackId
|
|
39
|
-
platformTrack!: PlatformTrack;
|
|
40
|
-
getPlatformTrack!: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
|
|
41
|
-
setPlatformTrack!: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
42
|
-
createPlatformTrack!: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
|
|
43
|
-
// PlatformUserAlbumTrack belongsTo PlatformUserAlbum via platformUserAlbumId
|
|
44
|
-
platformUserAlbum!: PlatformUserAlbum;
|
|
45
|
-
getPlatformUserAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformUserAlbum>;
|
|
46
|
-
setPlatformUserAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
|
|
47
|
-
createPlatformUserAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserAlbum>;
|
|
48
|
-
|
|
49
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbumTrack {
|
|
50
|
-
return PlatformUserAlbumTrack.init({
|
|
51
|
-
platformUserAlbumId: {
|
|
52
|
-
type: DataTypes.UUID,
|
|
53
|
-
allowNull: false,
|
|
54
|
-
references: {
|
|
55
|
-
model: 'platform_user_album',
|
|
56
|
-
key: 'id'
|
|
57
|
-
},
|
|
58
|
-
unique: "platform_user_album_track_platform_user_album_id_platform_track",
|
|
59
|
-
field: 'platform_user_album_id'
|
|
60
|
-
},
|
|
61
|
-
platformId: {
|
|
62
|
-
type: DataTypes.SMALLINT,
|
|
63
|
-
allowNull: false,
|
|
64
|
-
references: {
|
|
65
|
-
model: 'platform',
|
|
66
|
-
key: 'id'
|
|
67
|
-
},
|
|
68
|
-
field: 'platform_id'
|
|
69
|
-
},
|
|
70
|
-
externalUserAlbumTrackId: {
|
|
71
|
-
type: DataTypes.STRING(255),
|
|
72
|
-
allowNull: false,
|
|
73
|
-
field: 'external_user_album_track_id'
|
|
74
|
-
},
|
|
75
|
-
platformTrackId: {
|
|
76
|
-
type: DataTypes.UUID,
|
|
77
|
-
allowNull: false,
|
|
78
|
-
references: {
|
|
79
|
-
model: 'platform_track',
|
|
80
|
-
key: 'id'
|
|
81
|
-
},
|
|
82
|
-
unique: "platform_user_album_track_platform_user_album_id_platform_track",
|
|
83
|
-
field: 'platform_track_id'
|
|
84
|
-
},
|
|
85
|
-
stateId: {
|
|
86
|
-
type: DataTypes.SMALLINT,
|
|
87
|
-
allowNull: false,
|
|
88
|
-
field: 'state_id'
|
|
89
|
-
},
|
|
90
|
-
id: {
|
|
91
|
-
type: DataTypes.UUID,
|
|
92
|
-
allowNull: false,
|
|
93
|
-
defaultValue: DataTypes.UUIDV4,
|
|
94
|
-
primaryKey: true
|
|
95
|
-
},
|
|
96
|
-
createdAt: {
|
|
97
|
-
type: DataTypes.DATE,
|
|
98
|
-
allowNull: false,
|
|
99
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
100
|
-
field: 'created_at'
|
|
101
|
-
},
|
|
102
|
-
updatedAt: {
|
|
103
|
-
type: DataTypes.DATE,
|
|
104
|
-
allowNull: false,
|
|
105
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
106
|
-
field: 'updated_at'
|
|
107
|
-
}
|
|
108
|
-
}, {
|
|
109
|
-
sequelize,
|
|
110
|
-
tableName: 'platform_user_album_track',
|
|
111
|
-
schema: 'eb',
|
|
112
|
-
timestamps: false,
|
|
113
|
-
indexes: [
|
|
114
|
-
{
|
|
115
|
-
name: "platform_user_album_track_pkey",
|
|
116
|
-
unique: true,
|
|
117
|
-
fields: [
|
|
118
|
-
{ name: "id" },
|
|
119
|
-
]
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: "platform_user_album_track_platform_user_album_id_index",
|
|
123
|
-
fields: [
|
|
124
|
-
{ name: "platform_user_album_id" },
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: "platform_user_album_track_platform_user_album_id_platform_track",
|
|
129
|
-
unique: true,
|
|
130
|
-
fields: [
|
|
131
|
-
{ name: "platform_user_album_id" },
|
|
132
|
-
{ name: "platform_track_id" },
|
|
133
|
-
]
|
|
134
|
-
},
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
-
import type { Platform, PlatformId } from './Platform';
|
|
5
|
-
import type { PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId } from './PlatformUserPlaylistArtistAffinity';
|
|
6
|
-
import type { PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId } from './PlatformUserPlaylistGenreAffinity';
|
|
7
|
-
import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
|
|
8
|
-
import type { State, StateId } from './State';
|
|
9
|
-
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
10
|
-
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
11
|
-
import type { UserComments, UserCommentsId } from './UserComments';
|
|
12
|
-
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
13
|
-
|
|
14
|
-
export interface PlatformUserPlaylistAttributes {
|
|
15
|
-
appUserId: string;
|
|
16
|
-
platformId: number;
|
|
17
|
-
externalPlaylistId: string;
|
|
18
|
-
name: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
snapshotId: string;
|
|
21
|
-
id: string;
|
|
22
|
-
public?: boolean;
|
|
23
|
-
collaborative: boolean;
|
|
24
|
-
createDate: Date;
|
|
25
|
-
updateDate: Date;
|
|
26
|
-
stateId: number;
|
|
27
|
-
earbugAccessControlPreference: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type PlatformUserPlaylistPk = "id";
|
|
31
|
-
export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
|
|
32
|
-
export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId" | "earbugAccessControlPreference";
|
|
33
|
-
export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
|
|
34
|
-
|
|
35
|
-
export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
|
|
36
|
-
appUserId!: string;
|
|
37
|
-
platformId!: number;
|
|
38
|
-
externalPlaylistId!: string;
|
|
39
|
-
name!: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
snapshotId!: string;
|
|
42
|
-
id!: string;
|
|
43
|
-
public?: boolean;
|
|
44
|
-
collaborative!: boolean;
|
|
45
|
-
createDate!: Date;
|
|
46
|
-
updateDate!: Date;
|
|
47
|
-
stateId!: number;
|
|
48
|
-
earbugAccessControlPreference!: string;
|
|
49
|
-
|
|
50
|
-
// PlatformUserPlaylist belongsTo AppUser via appUserId
|
|
51
|
-
appUser!: AppUser;
|
|
52
|
-
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
53
|
-
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
54
|
-
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
55
|
-
// PlatformUserPlaylist belongsTo Platform via platformId
|
|
56
|
-
platform!: Platform;
|
|
57
|
-
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
58
|
-
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
59
|
-
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
60
|
-
// PlatformUserPlaylist hasMany PlatformUserPlaylistArtistAffinity via platformUserPlaylistId
|
|
61
|
-
platformUserPlaylistArtistAffinities!: PlatformUserPlaylistArtistAffinity[];
|
|
62
|
-
getPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistArtistAffinity>;
|
|
63
|
-
setPlatformUserPlaylistArtistAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
64
|
-
addPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
65
|
-
addPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
66
|
-
createPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistArtistAffinity>;
|
|
67
|
-
removePlatformUserPlaylistArtistAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
68
|
-
removePlatformUserPlaylistArtistAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
69
|
-
hasPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
70
|
-
hasPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
71
|
-
countPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
72
|
-
// PlatformUserPlaylist hasMany PlatformUserPlaylistGenreAffinity via platformUserPlaylistId
|
|
73
|
-
platformUserPlaylistGenreAffinities!: PlatformUserPlaylistGenreAffinity[];
|
|
74
|
-
getPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistGenreAffinity>;
|
|
75
|
-
setPlatformUserPlaylistGenreAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
76
|
-
addPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
77
|
-
addPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
78
|
-
createPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistGenreAffinity>;
|
|
79
|
-
removePlatformUserPlaylistGenreAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
80
|
-
removePlatformUserPlaylistGenreAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
81
|
-
hasPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
82
|
-
hasPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
83
|
-
countPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
84
|
-
// PlatformUserPlaylist hasMany PlatformUserPlaylistTrack via platformUserPlaylistId
|
|
85
|
-
platformUserPlaylistTracks!: PlatformUserPlaylistTrack[];
|
|
86
|
-
getPlatformUserPlaylistTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
|
|
87
|
-
setPlatformUserPlaylistTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
88
|
-
addPlatformUserPlaylistTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
89
|
-
addPlatformUserPlaylistTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
90
|
-
createPlatformUserPlaylistTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistTrack>;
|
|
91
|
-
removePlatformUserPlaylistTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
92
|
-
removePlatformUserPlaylistTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
93
|
-
hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
94
|
-
hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
|
|
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;
|
|
108
|
-
// PlatformUserPlaylist hasMany UserBookmarks via playlistId
|
|
109
|
-
userBookmarks!: UserBookmarks[];
|
|
110
|
-
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
111
|
-
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
112
|
-
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
113
|
-
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
114
|
-
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
115
|
-
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
116
|
-
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
117
|
-
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
118
|
-
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
119
|
-
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
120
|
-
// PlatformUserPlaylist hasMany UserComments via playlistId
|
|
121
|
-
userComments!: UserComments[];
|
|
122
|
-
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
|
123
|
-
setUserComments!: Sequelize.HasManySetAssociationsMixin<UserComments, UserCommentsId>;
|
|
124
|
-
addUserComment!: Sequelize.HasManyAddAssociationMixin<UserComments, UserCommentsId>;
|
|
125
|
-
addUserComments!: Sequelize.HasManyAddAssociationsMixin<UserComments, UserCommentsId>;
|
|
126
|
-
createUserComment!: Sequelize.HasManyCreateAssociationMixin<UserComments>;
|
|
127
|
-
removeUserComment!: Sequelize.HasManyRemoveAssociationMixin<UserComments, UserCommentsId>;
|
|
128
|
-
removeUserComments!: Sequelize.HasManyRemoveAssociationsMixin<UserComments, UserCommentsId>;
|
|
129
|
-
hasUserComment!: Sequelize.HasManyHasAssociationMixin<UserComments, UserCommentsId>;
|
|
130
|
-
hasUserComments!: Sequelize.HasManyHasAssociationsMixin<UserComments, UserCommentsId>;
|
|
131
|
-
countUserComments!: Sequelize.HasManyCountAssociationsMixin;
|
|
132
|
-
// PlatformUserPlaylist hasMany UserLikes via playlistId
|
|
133
|
-
userLikes!: UserLikes[];
|
|
134
|
-
getUserLikes!: Sequelize.HasManyGetAssociationsMixin<UserLikes>;
|
|
135
|
-
setUserLikes!: Sequelize.HasManySetAssociationsMixin<UserLikes, UserLikesId>;
|
|
136
|
-
addUserLike!: Sequelize.HasManyAddAssociationMixin<UserLikes, UserLikesId>;
|
|
137
|
-
addUserLikes!: Sequelize.HasManyAddAssociationsMixin<UserLikes, UserLikesId>;
|
|
138
|
-
createUserLike!: Sequelize.HasManyCreateAssociationMixin<UserLikes>;
|
|
139
|
-
removeUserLike!: Sequelize.HasManyRemoveAssociationMixin<UserLikes, UserLikesId>;
|
|
140
|
-
removeUserLikes!: Sequelize.HasManyRemoveAssociationsMixin<UserLikes, UserLikesId>;
|
|
141
|
-
hasUserLike!: Sequelize.HasManyHasAssociationMixin<UserLikes, UserLikesId>;
|
|
142
|
-
hasUserLikes!: Sequelize.HasManyHasAssociationsMixin<UserLikes, UserLikesId>;
|
|
143
|
-
countUserLikes!: Sequelize.HasManyCountAssociationsMixin;
|
|
144
|
-
// PlatformUserPlaylist belongsTo State via stateId
|
|
145
|
-
state!: State;
|
|
146
|
-
getState!: Sequelize.BelongsToGetAssociationMixin<State>;
|
|
147
|
-
setState!: Sequelize.BelongsToSetAssociationMixin<State, StateId>;
|
|
148
|
-
createState!: Sequelize.BelongsToCreateAssociationMixin<State>;
|
|
149
|
-
|
|
150
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylist {
|
|
151
|
-
return PlatformUserPlaylist.init({
|
|
152
|
-
appUserId: {
|
|
153
|
-
type: DataTypes.UUID,
|
|
154
|
-
allowNull: false,
|
|
155
|
-
references: {
|
|
156
|
-
model: 'app_user',
|
|
157
|
-
key: 'id'
|
|
158
|
-
},
|
|
159
|
-
unique: "uk_app_user_platform_playlist",
|
|
160
|
-
field: 'app_user_id'
|
|
161
|
-
},
|
|
162
|
-
platformId: {
|
|
163
|
-
type: DataTypes.SMALLINT,
|
|
164
|
-
allowNull: false,
|
|
165
|
-
references: {
|
|
166
|
-
model: 'platform',
|
|
167
|
-
key: 'id'
|
|
168
|
-
},
|
|
169
|
-
unique: "uk_app_user_platform_playlist",
|
|
170
|
-
field: 'platform_id'
|
|
171
|
-
},
|
|
172
|
-
externalPlaylistId: {
|
|
173
|
-
type: DataTypes.TEXT,
|
|
174
|
-
allowNull: false,
|
|
175
|
-
unique: "uk_app_user_platform_playlist",
|
|
176
|
-
field: 'external_playlist_id'
|
|
177
|
-
},
|
|
178
|
-
name: {
|
|
179
|
-
type: DataTypes.TEXT,
|
|
180
|
-
allowNull: false
|
|
181
|
-
},
|
|
182
|
-
description: {
|
|
183
|
-
type: DataTypes.TEXT,
|
|
184
|
-
allowNull: true
|
|
185
|
-
},
|
|
186
|
-
snapshotId: {
|
|
187
|
-
type: DataTypes.TEXT,
|
|
188
|
-
allowNull: false,
|
|
189
|
-
field: 'snapshot_id'
|
|
190
|
-
},
|
|
191
|
-
id: {
|
|
192
|
-
type: DataTypes.UUID,
|
|
193
|
-
allowNull: false,
|
|
194
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
195
|
-
primaryKey: true
|
|
196
|
-
},
|
|
197
|
-
public: {
|
|
198
|
-
type: DataTypes.BOOLEAN,
|
|
199
|
-
allowNull: true,
|
|
200
|
-
defaultValue: false
|
|
201
|
-
},
|
|
202
|
-
collaborative: {
|
|
203
|
-
type: DataTypes.BOOLEAN,
|
|
204
|
-
allowNull: false,
|
|
205
|
-
defaultValue: false
|
|
206
|
-
},
|
|
207
|
-
createDate: {
|
|
208
|
-
type: DataTypes.DATE,
|
|
209
|
-
allowNull: false,
|
|
210
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
211
|
-
field: 'create_date'
|
|
212
|
-
},
|
|
213
|
-
updateDate: {
|
|
214
|
-
type: DataTypes.DATE,
|
|
215
|
-
allowNull: false,
|
|
216
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
217
|
-
field: 'update_date'
|
|
218
|
-
},
|
|
219
|
-
stateId: {
|
|
220
|
-
type: DataTypes.SMALLINT,
|
|
221
|
-
allowNull: false,
|
|
222
|
-
defaultValue: 0,
|
|
223
|
-
references: {
|
|
224
|
-
model: 'state',
|
|
225
|
-
key: 'id'
|
|
226
|
-
},
|
|
227
|
-
field: 'state_id'
|
|
228
|
-
},
|
|
229
|
-
earbugAccessControlPreference: {
|
|
230
|
-
type: DataTypes.TEXT,
|
|
231
|
-
allowNull: false,
|
|
232
|
-
defaultValue: "PRIVATE",
|
|
233
|
-
field: 'earbug_access_control_preference'
|
|
234
|
-
}
|
|
235
|
-
}, {
|
|
236
|
-
sequelize,
|
|
237
|
-
tableName: 'platform_user_playlist',
|
|
238
|
-
schema: 'eb',
|
|
239
|
-
timestamps: false,
|
|
240
|
-
indexes: [
|
|
241
|
-
{
|
|
242
|
-
name: "playlist_pkey",
|
|
243
|
-
unique: true,
|
|
244
|
-
fields: [
|
|
245
|
-
{ name: "id" },
|
|
246
|
-
]
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
name: "uk_app_user_platform_playlist",
|
|
250
|
-
unique: true,
|
|
251
|
-
fields: [
|
|
252
|
-
{ name: "app_user_id" },
|
|
253
|
-
{ name: "platform_id" },
|
|
254
|
-
{ name: "external_playlist_id" },
|
|
255
|
-
]
|
|
256
|
-
},
|
|
257
|
-
]
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AffinityTier, AffinityTierId } from './AffinityTier';
|
|
4
|
-
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
5
|
-
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
|
-
|
|
7
|
-
export interface PlatformUserPlaylistArtistAffinityAttributes {
|
|
8
|
-
id: string;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
updatedAt: Date;
|
|
11
|
-
platformUserPlaylistId: string;
|
|
12
|
-
canonArtistId: string;
|
|
13
|
-
affinityTierId: number;
|
|
14
|
-
rank: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type PlatformUserPlaylistArtistAffinityPk = "id";
|
|
18
|
-
export type PlatformUserPlaylistArtistAffinityId = PlatformUserPlaylistArtistAffinity[PlatformUserPlaylistArtistAffinityPk];
|
|
19
|
-
export type PlatformUserPlaylistArtistAffinityOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
20
|
-
export type PlatformUserPlaylistArtistAffinityCreationAttributes = Optional<PlatformUserPlaylistArtistAffinityAttributes, PlatformUserPlaylistArtistAffinityOptionalAttributes>;
|
|
21
|
-
|
|
22
|
-
export class PlatformUserPlaylistArtistAffinity extends Model<PlatformUserPlaylistArtistAffinityAttributes, PlatformUserPlaylistArtistAffinityCreationAttributes> implements PlatformUserPlaylistArtistAffinityAttributes {
|
|
23
|
-
id!: string;
|
|
24
|
-
createdAt!: Date;
|
|
25
|
-
updatedAt!: Date;
|
|
26
|
-
platformUserPlaylistId!: string;
|
|
27
|
-
canonArtistId!: string;
|
|
28
|
-
affinityTierId!: number;
|
|
29
|
-
rank!: number;
|
|
30
|
-
|
|
31
|
-
// PlatformUserPlaylistArtistAffinity belongsTo AffinityTier via affinityTierId
|
|
32
|
-
affinityTier!: AffinityTier;
|
|
33
|
-
getAffinityTier!: Sequelize.BelongsToGetAssociationMixin<AffinityTier>;
|
|
34
|
-
setAffinityTier!: Sequelize.BelongsToSetAssociationMixin<AffinityTier, AffinityTierId>;
|
|
35
|
-
createAffinityTier!: Sequelize.BelongsToCreateAssociationMixin<AffinityTier>;
|
|
36
|
-
// PlatformUserPlaylistArtistAffinity belongsTo CanonArtist via canonArtistId
|
|
37
|
-
canonArtist!: CanonArtist;
|
|
38
|
-
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
39
|
-
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
40
|
-
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
41
|
-
// PlatformUserPlaylistArtistAffinity belongsTo PlatformUserPlaylist via platformUserPlaylistId
|
|
42
|
-
platformUserPlaylist!: PlatformUserPlaylist;
|
|
43
|
-
getPlatformUserPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
44
|
-
setPlatformUserPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
45
|
-
createPlatformUserPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
46
|
-
|
|
47
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistArtistAffinity {
|
|
48
|
-
return PlatformUserPlaylistArtistAffinity.init({
|
|
49
|
-
id: {
|
|
50
|
-
type: DataTypes.UUID,
|
|
51
|
-
allowNull: false,
|
|
52
|
-
defaultValue: DataTypes.UUIDV4,
|
|
53
|
-
primaryKey: true
|
|
54
|
-
},
|
|
55
|
-
createdAt: {
|
|
56
|
-
type: DataTypes.DATE,
|
|
57
|
-
allowNull: false,
|
|
58
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
59
|
-
field: 'created_at'
|
|
60
|
-
},
|
|
61
|
-
updatedAt: {
|
|
62
|
-
type: DataTypes.DATE,
|
|
63
|
-
allowNull: false,
|
|
64
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
65
|
-
field: 'updated_at'
|
|
66
|
-
},
|
|
67
|
-
platformUserPlaylistId: {
|
|
68
|
-
type: DataTypes.UUID,
|
|
69
|
-
allowNull: false,
|
|
70
|
-
references: {
|
|
71
|
-
model: 'platform_user_playlist',
|
|
72
|
-
key: 'id'
|
|
73
|
-
},
|
|
74
|
-
unique: "unique_pupaa_canon_artist",
|
|
75
|
-
field: 'platform_user_playlist_id'
|
|
76
|
-
},
|
|
77
|
-
canonArtistId: {
|
|
78
|
-
type: DataTypes.UUID,
|
|
79
|
-
allowNull: false,
|
|
80
|
-
references: {
|
|
81
|
-
model: 'canon_artist',
|
|
82
|
-
key: 'id'
|
|
83
|
-
},
|
|
84
|
-
unique: "unique_pupaa_canon_artist",
|
|
85
|
-
field: 'canon_artist_id'
|
|
86
|
-
},
|
|
87
|
-
affinityTierId: {
|
|
88
|
-
type: DataTypes.SMALLINT,
|
|
89
|
-
allowNull: false,
|
|
90
|
-
references: {
|
|
91
|
-
model: 'affinity_tier',
|
|
92
|
-
key: 'id'
|
|
93
|
-
},
|
|
94
|
-
field: 'affinity_tier_id'
|
|
95
|
-
},
|
|
96
|
-
rank: {
|
|
97
|
-
type: DataTypes.INTEGER,
|
|
98
|
-
allowNull: false
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
|
-
sequelize,
|
|
102
|
-
tableName: 'platform_user_playlist_artist_affinity',
|
|
103
|
-
schema: 'eb',
|
|
104
|
-
timestamps: false,
|
|
105
|
-
indexes: [
|
|
106
|
-
{
|
|
107
|
-
name: "idx_platform_user_playlist_artist_affinity",
|
|
108
|
-
fields: [
|
|
109
|
-
{ name: "platform_user_playlist_id" },
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "idx_platform_user_playlist_artist_affinity_artist",
|
|
114
|
-
fields: [
|
|
115
|
-
{ name: "canon_artist_id" },
|
|
116
|
-
]
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "platform_user_playlist_artist_affinity_pkey",
|
|
120
|
-
unique: true,
|
|
121
|
-
fields: [
|
|
122
|
-
{ name: "id" },
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "unique_pupaa_canon_artist",
|
|
127
|
-
unique: true,
|
|
128
|
-
fields: [
|
|
129
|
-
{ name: "platform_user_playlist_id" },
|
|
130
|
-
{ name: "canon_artist_id" },
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
]
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|