@earbug/db-models 0.0.31 → 0.0.33
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/AffinityTier.d.ts +24 -0
- package/dist/CanonArtist.d.ts +12 -0
- package/dist/CanonGenre.d.ts +12 -0
- package/dist/PlatformUserPlaylist.d.ts +24 -0
- package/dist/PlatformUserPlaylistArtistAffinity.d.ts +40 -0
- package/dist/PlatformUserPlaylistArtistAffinity.js +120 -0
- package/dist/PlatformUserPlaylistGenreAffinity.d.ts +40 -0
- package/dist/PlatformUserPlaylistGenreAffinity.js +120 -0
- package/dist/RadioShowMedia.d.ts +11 -1
- package/dist/RadioShowMedia.js +23 -0
- package/dist/RadioShowPlacement.d.ts +3 -1
- package/dist/RadioShowPlacement.js +4 -0
- package/dist/init-models.d.ts +8 -2
- package/dist/init-models.js +21 -1
- package/models/AffinityTier.ts +26 -0
- package/models/CanonArtist.ts +13 -0
- package/models/CanonGenre.ts +13 -0
- package/models/PlatformUserPlaylist.ts +26 -0
- package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
- package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
- package/models/RadioShowMedia.ts +34 -1
- package/models/RadioShowPlacement.ts +7 -1
- package/models/init-models.ts +26 -0
- package/package.json +1 -1
package/dist/init-models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.UserLikes = exports.UserGenreAffinity = exports.UserEngagementFactor = exports.UserContacts = exports.UserComments = exports.UserArtistAffinity = exports.UserAffinity = 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.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;
|
|
4
|
+
exports.UserLikes = exports.UserGenreAffinity = exports.UserEngagementFactor = exports.UserContacts = exports.UserComments = exports.UserArtistAffinity = exports.UserAffinity = 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
5
|
exports.initModels = initModels;
|
|
6
6
|
const AccessControlPreference_1 = require("./AccessControlPreference");
|
|
7
7
|
Object.defineProperty(exports, "AccessControlPreference", { enumerable: true, get: function () { return AccessControlPreference_1.AccessControlPreference; } });
|
|
@@ -157,6 +157,10 @@ const PlatformUserAlbumTrack_1 = require("./PlatformUserAlbumTrack");
|
|
|
157
157
|
Object.defineProperty(exports, "PlatformUserAlbumTrack", { enumerable: true, get: function () { return PlatformUserAlbumTrack_1.PlatformUserAlbumTrack; } });
|
|
158
158
|
const PlatformUserPlaylist_1 = require("./PlatformUserPlaylist");
|
|
159
159
|
Object.defineProperty(exports, "PlatformUserPlaylist", { enumerable: true, get: function () { return PlatformUserPlaylist_1.PlatformUserPlaylist; } });
|
|
160
|
+
const PlatformUserPlaylistArtistAffinity_1 = require("./PlatformUserPlaylistArtistAffinity");
|
|
161
|
+
Object.defineProperty(exports, "PlatformUserPlaylistArtistAffinity", { enumerable: true, get: function () { return PlatformUserPlaylistArtistAffinity_1.PlatformUserPlaylistArtistAffinity; } });
|
|
162
|
+
const PlatformUserPlaylistGenreAffinity_1 = require("./PlatformUserPlaylistGenreAffinity");
|
|
163
|
+
Object.defineProperty(exports, "PlatformUserPlaylistGenreAffinity", { enumerable: true, get: function () { return PlatformUserPlaylistGenreAffinity_1.PlatformUserPlaylistGenreAffinity; } });
|
|
160
164
|
const PlatformUserPlaylistTrack_1 = require("./PlatformUserPlaylistTrack");
|
|
161
165
|
Object.defineProperty(exports, "PlatformUserPlaylistTrack", { enumerable: true, get: function () { return PlatformUserPlaylistTrack_1.PlatformUserPlaylistTrack; } });
|
|
162
166
|
const PlaybackStatus_1 = require("./PlaybackStatus");
|
|
@@ -273,6 +277,8 @@ function initModels(sequelize) {
|
|
|
273
277
|
const PlatformUserAlbum = PlatformUserAlbum_1.PlatformUserAlbum.initModel(sequelize);
|
|
274
278
|
const PlatformUserAlbumTrack = PlatformUserAlbumTrack_1.PlatformUserAlbumTrack.initModel(sequelize);
|
|
275
279
|
const PlatformUserPlaylist = PlatformUserPlaylist_1.PlatformUserPlaylist.initModel(sequelize);
|
|
280
|
+
const PlatformUserPlaylistArtistAffinity = PlatformUserPlaylistArtistAffinity_1.PlatformUserPlaylistArtistAffinity.initModel(sequelize);
|
|
281
|
+
const PlatformUserPlaylistGenreAffinity = PlatformUserPlaylistGenreAffinity_1.PlatformUserPlaylistGenreAffinity.initModel(sequelize);
|
|
276
282
|
const PlatformUserPlaylistTrack = PlatformUserPlaylistTrack_1.PlatformUserPlaylistTrack.initModel(sequelize);
|
|
277
283
|
const PlaybackStatus = PlaybackStatus_1.PlaybackStatus.initModel(sequelize);
|
|
278
284
|
const PlaybackStatusType = PlaybackStatusType_1.PlaybackStatusType.initModel(sequelize);
|
|
@@ -342,6 +348,10 @@ function initModels(sequelize) {
|
|
|
342
348
|
AffinityTier.hasMany(JukeboxSessionArtistAffinity, { as: "jukeboxSessionArtistAffinities", foreignKey: "affinityTierId" });
|
|
343
349
|
JukeboxSessionGenreAffinity.belongsTo(AffinityTier, { as: "affinityTier", foreignKey: "affinityTierId" });
|
|
344
350
|
AffinityTier.hasMany(JukeboxSessionGenreAffinity, { as: "jukeboxSessionGenreAffinities", foreignKey: "affinityTierId" });
|
|
351
|
+
PlatformUserPlaylistArtistAffinity.belongsTo(AffinityTier, { as: "affinityTier", foreignKey: "affinityTierId" });
|
|
352
|
+
AffinityTier.hasMany(PlatformUserPlaylistArtistAffinity, { as: "platformUserPlaylistArtistAffinities", foreignKey: "affinityTierId" });
|
|
353
|
+
PlatformUserPlaylistGenreAffinity.belongsTo(AffinityTier, { as: "affinityTier", foreignKey: "affinityTierId" });
|
|
354
|
+
AffinityTier.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "affinityTierId" });
|
|
345
355
|
UserArtistAffinity.belongsTo(AffinityTier, { as: "affinityTier", foreignKey: "affinityTierId" });
|
|
346
356
|
AffinityTier.hasMany(UserArtistAffinity, { as: "userArtistAffinities", foreignKey: "affinityTierId" });
|
|
347
357
|
UserGenreAffinity.belongsTo(AffinityTier, { as: "affinityTier", foreignKey: "affinityTierId" });
|
|
@@ -410,6 +420,8 @@ function initModels(sequelize) {
|
|
|
410
420
|
CanonArtist.hasMany(MerchOrchestration, { as: "merchOrchestrations", foreignKey: "canonArtistId" });
|
|
411
421
|
NewsArticle.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
412
422
|
CanonArtist.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "canonArtistId" });
|
|
423
|
+
PlatformUserPlaylistArtistAffinity.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
424
|
+
CanonArtist.hasMany(PlatformUserPlaylistArtistAffinity, { as: "platformUserPlaylistArtistAffinities", foreignKey: "canonArtistId" });
|
|
413
425
|
UserArtistAffinity.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
414
426
|
CanonArtist.hasMany(UserArtistAffinity, { as: "userArtistAffinities", foreignKey: "canonArtistId" });
|
|
415
427
|
CanonAlbumGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
@@ -424,6 +436,8 @@ function initModels(sequelize) {
|
|
|
424
436
|
CanonGenre.hasMany(JukeboxCanonGenreRelation, { as: "jukeboxCanonGenreRelations", foreignKey: "canonGenreId" });
|
|
425
437
|
JukeboxSessionGenreAffinity.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
426
438
|
CanonGenre.hasMany(JukeboxSessionGenreAffinity, { as: "jukeboxSessionGenreAffinities", foreignKey: "canonGenreId" });
|
|
439
|
+
PlatformUserPlaylistGenreAffinity.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
440
|
+
CanonGenre.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "canonGenreId" });
|
|
427
441
|
RadioShowGenres.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
428
442
|
CanonGenre.hasMany(RadioShowGenres, { as: "radioShowGenres", foreignKey: "canonGenreId" });
|
|
429
443
|
UserGenreAffinity.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
@@ -582,6 +596,10 @@ function initModels(sequelize) {
|
|
|
582
596
|
PlatformTrack.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformTrackId" });
|
|
583
597
|
PlatformUserAlbumTrack.belongsTo(PlatformUserAlbum, { as: "platformUserAlbum", foreignKey: "platformUserAlbumId" });
|
|
584
598
|
PlatformUserAlbum.hasMany(PlatformUserAlbumTrack, { as: "platformUserAlbumTracks", foreignKey: "platformUserAlbumId" });
|
|
599
|
+
PlatformUserPlaylistArtistAffinity.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
600
|
+
PlatformUserPlaylist.hasMany(PlatformUserPlaylistArtistAffinity, { as: "platformUserPlaylistArtistAffinities", foreignKey: "platformUserPlaylistId" });
|
|
601
|
+
PlatformUserPlaylistGenreAffinity.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
602
|
+
PlatformUserPlaylist.hasMany(PlatformUserPlaylistGenreAffinity, { as: "platformUserPlaylistGenreAffinities", foreignKey: "platformUserPlaylistId" });
|
|
585
603
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
586
604
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
587
605
|
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
@@ -690,6 +708,8 @@ function initModels(sequelize) {
|
|
|
690
708
|
PlatformUserAlbum: PlatformUserAlbum,
|
|
691
709
|
PlatformUserAlbumTrack: PlatformUserAlbumTrack,
|
|
692
710
|
PlatformUserPlaylist: PlatformUserPlaylist,
|
|
711
|
+
PlatformUserPlaylistArtistAffinity: PlatformUserPlaylistArtistAffinity,
|
|
712
|
+
PlatformUserPlaylistGenreAffinity: PlatformUserPlaylistGenreAffinity,
|
|
693
713
|
PlatformUserPlaylistTrack: PlatformUserPlaylistTrack,
|
|
694
714
|
PlaybackStatus: PlaybackStatus,
|
|
695
715
|
PlaybackStatusType: PlaybackStatusType,
|
package/models/AffinityTier.ts
CHANGED
|
@@ -2,6 +2,8 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { JukeboxSessionArtistAffinity, JukeboxSessionArtistAffinityId } from './JukeboxSessionArtistAffinity';
|
|
4
4
|
import type { JukeboxSessionGenreAffinity, JukeboxSessionGenreAffinityId } from './JukeboxSessionGenreAffinity';
|
|
5
|
+
import type { PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId } from './PlatformUserPlaylistArtistAffinity';
|
|
6
|
+
import type { PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId } from './PlatformUserPlaylistGenreAffinity';
|
|
5
7
|
import type { UserArtistAffinity, UserArtistAffinityId } from './UserArtistAffinity';
|
|
6
8
|
import type { UserGenreAffinity, UserGenreAffinityId } from './UserGenreAffinity';
|
|
7
9
|
|
|
@@ -42,6 +44,30 @@ export class AffinityTier extends Model<AffinityTierAttributes, AffinityTierCrea
|
|
|
42
44
|
hasJukeboxSessionGenreAffinity!: Sequelize.HasManyHasAssociationMixin<JukeboxSessionGenreAffinity, JukeboxSessionGenreAffinityId>;
|
|
43
45
|
hasJukeboxSessionGenreAffinities!: Sequelize.HasManyHasAssociationsMixin<JukeboxSessionGenreAffinity, JukeboxSessionGenreAffinityId>;
|
|
44
46
|
countJukeboxSessionGenreAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
47
|
+
// AffinityTier hasMany PlatformUserPlaylistArtistAffinity via affinityTierId
|
|
48
|
+
platformUserPlaylistArtistAffinities!: PlatformUserPlaylistArtistAffinity[];
|
|
49
|
+
getPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistArtistAffinity>;
|
|
50
|
+
setPlatformUserPlaylistArtistAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
51
|
+
addPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
52
|
+
addPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
53
|
+
createPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistArtistAffinity>;
|
|
54
|
+
removePlatformUserPlaylistArtistAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
55
|
+
removePlatformUserPlaylistArtistAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
56
|
+
hasPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
57
|
+
hasPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
58
|
+
countPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
59
|
+
// AffinityTier hasMany PlatformUserPlaylistGenreAffinity via affinityTierId
|
|
60
|
+
platformUserPlaylistGenreAffinities!: PlatformUserPlaylistGenreAffinity[];
|
|
61
|
+
getPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistGenreAffinity>;
|
|
62
|
+
setPlatformUserPlaylistGenreAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
63
|
+
addPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
64
|
+
addPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
65
|
+
createPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistGenreAffinity>;
|
|
66
|
+
removePlatformUserPlaylistGenreAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
67
|
+
removePlatformUserPlaylistGenreAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
68
|
+
hasPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
69
|
+
hasPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
70
|
+
countPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
45
71
|
// AffinityTier hasMany UserArtistAffinity via affinityTierId
|
|
46
72
|
userArtistAffinities!: UserArtistAffinity[];
|
|
47
73
|
getUserArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<UserArtistAffinity>;
|
package/models/CanonArtist.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { MerchOrchestration, MerchOrchestrationId } from './MerchOrchestrat
|
|
|
11
11
|
import type { NewsArticle, NewsArticleId } from './NewsArticle';
|
|
12
12
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
13
13
|
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
14
|
+
import type { PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId } from './PlatformUserPlaylistArtistAffinity';
|
|
14
15
|
import type { UserArtistAffinity, UserArtistAffinityId } from './UserArtistAffinity';
|
|
15
16
|
|
|
16
17
|
export interface CanonArtistAttributes {
|
|
@@ -185,6 +186,18 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
185
186
|
hasPlatformArtistIdPlatformArtist!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
186
187
|
hasPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
187
188
|
countPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
189
|
+
// CanonArtist hasMany PlatformUserPlaylistArtistAffinity via canonArtistId
|
|
190
|
+
platformUserPlaylistArtistAffinities!: PlatformUserPlaylistArtistAffinity[];
|
|
191
|
+
getPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistArtistAffinity>;
|
|
192
|
+
setPlatformUserPlaylistArtistAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
193
|
+
addPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
194
|
+
addPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
195
|
+
createPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistArtistAffinity>;
|
|
196
|
+
removePlatformUserPlaylistArtistAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
197
|
+
removePlatformUserPlaylistArtistAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
198
|
+
hasPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
199
|
+
hasPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
200
|
+
countPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
188
201
|
// CanonArtist hasMany UserArtistAffinity via canonArtistId
|
|
189
202
|
userArtistAffinities!: UserArtistAffinity[];
|
|
190
203
|
getUserArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<UserArtistAffinity>;
|
package/models/CanonGenre.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { JukeboxSessionGenreAffinity, JukeboxSessionGenreAffinityId } from
|
|
|
10
10
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
11
11
|
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
12
12
|
import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
|
|
13
|
+
import type { PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId } from './PlatformUserPlaylistGenreAffinity';
|
|
13
14
|
import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
|
|
14
15
|
import type { UserGenreAffinity, UserGenreAffinityId } from './UserGenreAffinity';
|
|
15
16
|
|
|
@@ -157,6 +158,18 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
|
|
|
157
158
|
hasPlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
158
159
|
hasPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
159
160
|
countPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
161
|
+
// CanonGenre hasMany PlatformUserPlaylistGenreAffinity via canonGenreId
|
|
162
|
+
platformUserPlaylistGenreAffinities!: PlatformUserPlaylistGenreAffinity[];
|
|
163
|
+
getPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistGenreAffinity>;
|
|
164
|
+
setPlatformUserPlaylistGenreAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
165
|
+
addPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
166
|
+
addPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
167
|
+
createPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistGenreAffinity>;
|
|
168
|
+
removePlatformUserPlaylistGenreAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
169
|
+
removePlatformUserPlaylistGenreAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
170
|
+
hasPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
171
|
+
hasPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
172
|
+
countPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
160
173
|
// CanonGenre hasMany RadioShowGenres via canonGenreId
|
|
161
174
|
radioShowGenres!: RadioShowGenres[];
|
|
162
175
|
getRadioShowGenres!: Sequelize.HasManyGetAssociationsMixin<RadioShowGenres>;
|
|
@@ -2,6 +2,8 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
import type { Platform, PlatformId } from './Platform';
|
|
5
|
+
import type { PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId } from './PlatformUserPlaylistArtistAffinity';
|
|
6
|
+
import type { PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId } from './PlatformUserPlaylistGenreAffinity';
|
|
5
7
|
import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
|
|
6
8
|
import type { State, StateId } from './State';
|
|
7
9
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
@@ -53,6 +55,30 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
53
55
|
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
54
56
|
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
55
57
|
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
58
|
+
// PlatformUserPlaylist hasMany PlatformUserPlaylistArtistAffinity via platformUserPlaylistId
|
|
59
|
+
platformUserPlaylistArtistAffinities!: PlatformUserPlaylistArtistAffinity[];
|
|
60
|
+
getPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistArtistAffinity>;
|
|
61
|
+
setPlatformUserPlaylistArtistAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
62
|
+
addPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
63
|
+
addPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
64
|
+
createPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistArtistAffinity>;
|
|
65
|
+
removePlatformUserPlaylistArtistAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
66
|
+
removePlatformUserPlaylistArtistAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
67
|
+
hasPlatformUserPlaylistArtistAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
68
|
+
hasPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistArtistAffinity, PlatformUserPlaylistArtistAffinityId>;
|
|
69
|
+
countPlatformUserPlaylistArtistAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
70
|
+
// PlatformUserPlaylist hasMany PlatformUserPlaylistGenreAffinity via platformUserPlaylistId
|
|
71
|
+
platformUserPlaylistGenreAffinities!: PlatformUserPlaylistGenreAffinity[];
|
|
72
|
+
getPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistGenreAffinity>;
|
|
73
|
+
setPlatformUserPlaylistGenreAffinities!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
74
|
+
addPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
75
|
+
addPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
76
|
+
createPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistGenreAffinity>;
|
|
77
|
+
removePlatformUserPlaylistGenreAffinity!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
78
|
+
removePlatformUserPlaylistGenreAffinities!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
79
|
+
hasPlatformUserPlaylistGenreAffinity!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
80
|
+
hasPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistGenreAffinity, PlatformUserPlaylistGenreAffinityId>;
|
|
81
|
+
countPlatformUserPlaylistGenreAffinities!: Sequelize.HasManyCountAssociationsMixin;
|
|
56
82
|
// PlatformUserPlaylist hasMany PlatformUserPlaylistTrack via platformUserPlaylistId
|
|
57
83
|
platformUserPlaylistTracks!: PlatformUserPlaylistTrack[];
|
|
58
84
|
getPlatformUserPlaylistTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
|
|
@@ -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 { 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
|
+
}
|
|
@@ -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 { CanonGenre, CanonGenreId } from './CanonGenre';
|
|
5
|
+
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
|
+
|
|
7
|
+
export interface PlatformUserPlaylistGenreAffinityAttributes {
|
|
8
|
+
platformUserPlaylistId: string;
|
|
9
|
+
canonGenreId: string;
|
|
10
|
+
affinityTierId: number;
|
|
11
|
+
rank: number;
|
|
12
|
+
id: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type PlatformUserPlaylistGenreAffinityPk = "id";
|
|
18
|
+
export type PlatformUserPlaylistGenreAffinityId = PlatformUserPlaylistGenreAffinity[PlatformUserPlaylistGenreAffinityPk];
|
|
19
|
+
export type PlatformUserPlaylistGenreAffinityOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
20
|
+
export type PlatformUserPlaylistGenreAffinityCreationAttributes = Optional<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityOptionalAttributes>;
|
|
21
|
+
|
|
22
|
+
export class PlatformUserPlaylistGenreAffinity extends Model<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityCreationAttributes> implements PlatformUserPlaylistGenreAffinityAttributes {
|
|
23
|
+
platformUserPlaylistId!: string;
|
|
24
|
+
canonGenreId!: string;
|
|
25
|
+
affinityTierId!: number;
|
|
26
|
+
rank!: number;
|
|
27
|
+
id!: string;
|
|
28
|
+
createdAt!: Date;
|
|
29
|
+
updatedAt!: Date;
|
|
30
|
+
|
|
31
|
+
// PlatformUserPlaylistGenreAffinity belongsTo AffinityTier via affinityTierId
|
|
32
|
+
affinityTier!: AffinityTier;
|
|
33
|
+
getAffinityTier!: Sequelize.BelongsToGetAssociationMixin<AffinityTier>;
|
|
34
|
+
setAffinityTier!: Sequelize.BelongsToSetAssociationMixin<AffinityTier, AffinityTierId>;
|
|
35
|
+
createAffinityTier!: Sequelize.BelongsToCreateAssociationMixin<AffinityTier>;
|
|
36
|
+
// PlatformUserPlaylistGenreAffinity belongsTo CanonGenre via canonGenreId
|
|
37
|
+
canonGenre!: CanonGenre;
|
|
38
|
+
getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
|
|
39
|
+
setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
|
|
40
|
+
createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
|
|
41
|
+
// PlatformUserPlaylistGenreAffinity 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 PlatformUserPlaylistGenreAffinity {
|
|
48
|
+
return PlatformUserPlaylistGenreAffinity.init({
|
|
49
|
+
platformUserPlaylistId: {
|
|
50
|
+
type: DataTypes.UUID,
|
|
51
|
+
allowNull: false,
|
|
52
|
+
references: {
|
|
53
|
+
model: 'platform_user_playlist',
|
|
54
|
+
key: 'id'
|
|
55
|
+
},
|
|
56
|
+
unique: "unique_pupga_canon_genre",
|
|
57
|
+
field: 'platform_user_playlist_id'
|
|
58
|
+
},
|
|
59
|
+
canonGenreId: {
|
|
60
|
+
type: DataTypes.UUID,
|
|
61
|
+
allowNull: false,
|
|
62
|
+
references: {
|
|
63
|
+
model: 'canon_genre',
|
|
64
|
+
key: 'id'
|
|
65
|
+
},
|
|
66
|
+
unique: "unique_pupga_canon_genre",
|
|
67
|
+
field: 'canon_genre_id'
|
|
68
|
+
},
|
|
69
|
+
affinityTierId: {
|
|
70
|
+
type: DataTypes.SMALLINT,
|
|
71
|
+
allowNull: false,
|
|
72
|
+
references: {
|
|
73
|
+
model: 'affinity_tier',
|
|
74
|
+
key: 'id'
|
|
75
|
+
},
|
|
76
|
+
field: 'affinity_tier_id'
|
|
77
|
+
},
|
|
78
|
+
rank: {
|
|
79
|
+
type: DataTypes.INTEGER,
|
|
80
|
+
allowNull: false
|
|
81
|
+
},
|
|
82
|
+
id: {
|
|
83
|
+
type: DataTypes.UUID,
|
|
84
|
+
allowNull: false,
|
|
85
|
+
defaultValue: DataTypes.UUIDV4,
|
|
86
|
+
primaryKey: true
|
|
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: 'platform_user_playlist_genre_affinity',
|
|
103
|
+
schema: 'eb',
|
|
104
|
+
timestamps: false,
|
|
105
|
+
indexes: [
|
|
106
|
+
{
|
|
107
|
+
name: "idx_platform_user_playlist_genre_affinity",
|
|
108
|
+
fields: [
|
|
109
|
+
{ name: "platform_user_playlist_id" },
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "idx_platform_user_playlist_genre_affinity_genre",
|
|
114
|
+
fields: [
|
|
115
|
+
{ name: "canon_genre_id" },
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "platform_user_playlist_genre_affinity_pkey",
|
|
120
|
+
unique: true,
|
|
121
|
+
fields: [
|
|
122
|
+
{ name: "id" },
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "unique_pupga_canon_genre",
|
|
127
|
+
unique: true,
|
|
128
|
+
fields: [
|
|
129
|
+
{ name: "platform_user_playlist_id" },
|
|
130
|
+
{ name: "canon_genre_id" },
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
package/models/RadioShowMedia.ts
CHANGED
|
@@ -10,11 +10,16 @@ export interface RadioShowMediaAttributes {
|
|
|
10
10
|
approved?: boolean;
|
|
11
11
|
id: string;
|
|
12
12
|
createDate: Date;
|
|
13
|
+
description?: string;
|
|
14
|
+
cropInstructions?: string;
|
|
15
|
+
deleted?: boolean;
|
|
16
|
+
sourceS3Key?: string;
|
|
17
|
+
isAppRecorded?: boolean;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export type RadioShowMediaPk = "id";
|
|
16
21
|
export type RadioShowMediaId = RadioShowMedia[RadioShowMediaPk];
|
|
17
|
-
export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "approved" | "id" | "createDate";
|
|
22
|
+
export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "approved" | "id" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded";
|
|
18
23
|
export type RadioShowMediaCreationAttributes = Optional<RadioShowMediaAttributes, RadioShowMediaOptionalAttributes>;
|
|
19
24
|
|
|
20
25
|
export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMediaCreationAttributes> implements RadioShowMediaAttributes {
|
|
@@ -25,6 +30,11 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
|
|
|
25
30
|
approved?: boolean;
|
|
26
31
|
id!: string;
|
|
27
32
|
createDate!: Date;
|
|
33
|
+
description?: string;
|
|
34
|
+
cropInstructions?: string;
|
|
35
|
+
deleted?: boolean;
|
|
36
|
+
sourceS3Key?: string;
|
|
37
|
+
isAppRecorded?: boolean;
|
|
28
38
|
|
|
29
39
|
// RadioShowMedia belongsTo RadioShow via radioShowId
|
|
30
40
|
radioShow!: RadioShow;
|
|
@@ -73,6 +83,29 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
|
|
|
73
83
|
allowNull: false,
|
|
74
84
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
75
85
|
field: 'create_date'
|
|
86
|
+
},
|
|
87
|
+
description: {
|
|
88
|
+
type: DataTypes.TEXT,
|
|
89
|
+
allowNull: true
|
|
90
|
+
},
|
|
91
|
+
cropInstructions: {
|
|
92
|
+
type: DataTypes.TEXT,
|
|
93
|
+
allowNull: true,
|
|
94
|
+
field: 'crop_instructions'
|
|
95
|
+
},
|
|
96
|
+
deleted: {
|
|
97
|
+
type: DataTypes.BOOLEAN,
|
|
98
|
+
allowNull: true
|
|
99
|
+
},
|
|
100
|
+
sourceS3Key: {
|
|
101
|
+
type: DataTypes.TEXT,
|
|
102
|
+
allowNull: true,
|
|
103
|
+
field: 'source_s3_key'
|
|
104
|
+
},
|
|
105
|
+
isAppRecorded: {
|
|
106
|
+
type: DataTypes.BOOLEAN,
|
|
107
|
+
allowNull: true,
|
|
108
|
+
field: 'is_app_recorded'
|
|
76
109
|
}
|
|
77
110
|
}, {
|
|
78
111
|
sequelize,
|
|
@@ -11,11 +11,12 @@ export interface RadioShowPlacementAttributes {
|
|
|
11
11
|
startTime?: string;
|
|
12
12
|
endTime?: string;
|
|
13
13
|
id: string;
|
|
14
|
+
deleted?: boolean;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export type RadioShowPlacementPk = "id";
|
|
17
18
|
export type RadioShowPlacementId = RadioShowPlacement[RadioShowPlacementPk];
|
|
18
|
-
export type RadioShowPlacementOptionalAttributes = "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "id";
|
|
19
|
+
export type RadioShowPlacementOptionalAttributes = "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "id" | "deleted";
|
|
19
20
|
export type RadioShowPlacementCreationAttributes = Optional<RadioShowPlacementAttributes, RadioShowPlacementOptionalAttributes>;
|
|
20
21
|
|
|
21
22
|
export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes> implements RadioShowPlacementAttributes {
|
|
@@ -26,6 +27,7 @@ export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, Radi
|
|
|
26
27
|
startTime?: string;
|
|
27
28
|
endTime?: string;
|
|
28
29
|
id!: string;
|
|
30
|
+
deleted?: boolean;
|
|
29
31
|
|
|
30
32
|
// RadioShowPlacement belongsTo CanonTrack via canonTrackId
|
|
31
33
|
canonTrack!: CanonTrack;
|
|
@@ -83,6 +85,10 @@ export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, Radi
|
|
|
83
85
|
allowNull: false,
|
|
84
86
|
defaultValue: DataTypes.UUIDV4,
|
|
85
87
|
primaryKey: true
|
|
88
|
+
},
|
|
89
|
+
deleted: {
|
|
90
|
+
type: DataTypes.BOOLEAN,
|
|
91
|
+
allowNull: true
|
|
86
92
|
}
|
|
87
93
|
}, {
|
|
88
94
|
sequelize,
|