@earbug/db-models 0.0.4 → 0.0.6
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/README.md +11 -0
- package/dist/AppUserDevice.d.ts +2 -2
- package/dist/AppUserDevice.js +2 -2
- package/dist/CanonAlbum.d.ts +0 -24
- package/dist/CanonAlbumTrackRelation.d.ts +10 -10
- package/dist/CanonAlbumTrackRelation.js +2 -2
- package/dist/CanonArtist.d.ts +11 -11
- package/dist/CanonTrack.d.ts +0 -24
- package/dist/JukeboxCanonGenreRelation.d.ts +1 -1
- package/dist/JukeboxCanonGenreRelation.js +0 -1
- package/dist/PlatformAlbum.d.ts +28 -1
- package/dist/PlatformAlbum.js +10 -0
- package/dist/PlatformArtist.d.ts +7 -1
- package/dist/PlatformArtist.js +14 -0
- package/dist/PlatformTrack.d.ts +28 -1
- package/dist/PlatformTrack.js +10 -0
- package/dist/PlatformUserAlbumTrack.d.ts +1 -1
- package/dist/PlatformUserAlbumTrack.js +0 -1
- package/dist/PlaybackStatusType.d.ts +14 -0
- package/dist/PlaybackStatusType.js +34 -0
- package/dist/init-models.d.ts +5 -2
- package/dist/init-models.js +12 -8
- package/models/AppUserDevice.ts +4 -4
- package/models/CanonAlbum.ts +0 -26
- package/models/CanonAlbumTrackRelation.ts +14 -14
- package/models/CanonArtist.ts +11 -11
- package/models/CanonTrack.ts +0 -26
- package/models/JukeboxCanonGenreRelation.ts +1 -2
- package/models/PlatformAlbum.ts +40 -1
- package/models/PlatformArtist.ts +21 -1
- package/models/PlatformTrack.ts +40 -1
- package/models/PlatformUserAlbumTrack.ts +1 -2
- package/models/PlaybackStatusType.ts +45 -0
- package/models/init-models.ts +14 -7
- package/package.json +1 -1
- package/README +0 -1
package/models/init-models.ts
CHANGED
|
@@ -125,6 +125,8 @@ import { PlatformUserPlaylistTrack as _PlatformUserPlaylistTrack } from "./Platf
|
|
|
125
125
|
import type { PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes } from "./PlatformUserPlaylistTrack";
|
|
126
126
|
import { PlaybackStatus as _PlaybackStatus } from "./PlaybackStatus";
|
|
127
127
|
import type { PlaybackStatusAttributes, PlaybackStatusCreationAttributes } from "./PlaybackStatus";
|
|
128
|
+
import { PlaybackStatusType as _PlaybackStatusType } from "./PlaybackStatusType";
|
|
129
|
+
import type { PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes } from "./PlaybackStatusType";
|
|
128
130
|
import { State as _State } from "./State";
|
|
129
131
|
import type { StateAttributes, StateCreationAttributes } from "./State";
|
|
130
132
|
import { TrackDeletionReason as _TrackDeletionReason } from "./TrackDeletionReason";
|
|
@@ -200,6 +202,7 @@ export {
|
|
|
200
202
|
_PlatformUserPlaylist as PlatformUserPlaylist,
|
|
201
203
|
_PlatformUserPlaylistTrack as PlatformUserPlaylistTrack,
|
|
202
204
|
_PlaybackStatus as PlaybackStatus,
|
|
205
|
+
_PlaybackStatusType as PlaybackStatusType,
|
|
203
206
|
_State as State,
|
|
204
207
|
_TrackDeletionReason as TrackDeletionReason,
|
|
205
208
|
_UnmatchedAlbum as UnmatchedAlbum,
|
|
@@ -334,6 +337,8 @@ export type {
|
|
|
334
337
|
PlatformUserPlaylistTrackCreationAttributes,
|
|
335
338
|
PlaybackStatusAttributes,
|
|
336
339
|
PlaybackStatusCreationAttributes,
|
|
340
|
+
PlaybackStatusTypeAttributes,
|
|
341
|
+
PlaybackStatusTypeCreationAttributes,
|
|
337
342
|
StateAttributes,
|
|
338
343
|
StateCreationAttributes,
|
|
339
344
|
TrackDeletionReasonAttributes,
|
|
@@ -410,16 +415,16 @@ export function initModels(sequelize: Sequelize) {
|
|
|
410
415
|
const PlatformUserPlaylist = _PlatformUserPlaylist.initModel(sequelize);
|
|
411
416
|
const PlatformUserPlaylistTrack = _PlatformUserPlaylistTrack.initModel(sequelize);
|
|
412
417
|
const PlaybackStatus = _PlaybackStatus.initModel(sequelize);
|
|
418
|
+
const PlaybackStatusType = _PlaybackStatusType.initModel(sequelize);
|
|
413
419
|
const State = _State.initModel(sequelize);
|
|
414
420
|
const TrackDeletionReason = _TrackDeletionReason.initModel(sequelize);
|
|
415
421
|
const UnmatchedAlbum = _UnmatchedAlbum.initModel(sequelize);
|
|
416
422
|
const UnmatchedArtist = _UnmatchedArtist.initModel(sequelize);
|
|
417
423
|
const UserContacts = _UserContacts.initModel(sequelize);
|
|
418
424
|
|
|
419
|
-
CanonAlbum.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
420
425
|
CanonAlbum.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferences', through: CanonAlbumExternalReferenceRelation, foreignKey: "canonAlbumId", otherKey: "externalReferenceId" });
|
|
421
426
|
CanonAlbum.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbums', through: CanonToPlatformAlbumRelation, foreignKey: "canonAlbumId", otherKey: "platformAlbumId" });
|
|
422
|
-
CanonArtist.belongsToMany(CanonTrack, { as: '
|
|
427
|
+
CanonArtist.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonArtistTrackRelation, foreignKey: "canonArtistId", otherKey: "canonTrackId" });
|
|
423
428
|
CanonArtist.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonArtistAlbumRelations', through: CanonArtistAlbumRelation, foreignKey: "canonArtistId", otherKey: "canonAlbumId" });
|
|
424
429
|
CanonArtist.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtists', through: CanonToPlatformArtistRelation, foreignKey: "canonArtistId", otherKey: "platformArtistId" });
|
|
425
430
|
CanonGenre.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations', through: CanonGenreExternalReferenceRelation, foreignKey: "canonGenreId", otherKey: "externalReferenceId" });
|
|
@@ -430,7 +435,6 @@ export function initModels(sequelize: Sequelize) {
|
|
|
430
435
|
CanonLabel.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumLabelRelations', through: CanonAlbumLabelRelation, foreignKey: "canonLabelId", otherKey: "canonAlbumId" });
|
|
431
436
|
CanonMember.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonMemberExternalReferenceRelations', through: CanonMemberExternalReferenceRelation, foreignKey: "canonMemberId", otherKey: "externalReferenceId" });
|
|
432
437
|
CanonMember.belongsToMany(PlatformArtist, { as: 'canonArtistIdPlatformArtistCanonArtistMemberRelations', through: CanonArtistMemberRelation, foreignKey: "canonMemberId", otherKey: "canonArtistId" });
|
|
433
|
-
CanonTrack.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
434
438
|
CanonTrack.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonArtistTrackRelations', through: CanonArtistTrackRelation, foreignKey: "canonTrackId", otherKey: "canonArtistId" });
|
|
435
439
|
CanonTrack.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTracks', through: CanonToPlatformTrackRelation, foreignKey: "canonTrackId", otherKey: "platformTrackId" });
|
|
436
440
|
ExternalReference.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbums', through: CanonAlbumExternalReferenceRelation, foreignKey: "externalReferenceId", otherKey: "canonAlbumId" });
|
|
@@ -444,6 +448,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
444
448
|
PlatformAlbum.belongsToMany(CanonLabel, { as: 'canonLabelIdCanonLabels', through: CanonAlbumLabelRelation, foreignKey: "canonAlbumId", otherKey: "canonLabelId" });
|
|
445
449
|
PlatformAlbum.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistAlbumRelations', through: PlatformArtistAlbumRelation, foreignKey: "platformAlbumId", otherKey: "platformArtistId" });
|
|
446
450
|
PlatformAlbum.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformAlbumGenreRelations', through: PlatformAlbumGenreRelation, foreignKey: "platformAlbumId", otherKey: "platformGenreId" });
|
|
451
|
+
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'canonTrackIdPlatformTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
447
452
|
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformAlbumId", otherKey: "platformTrackId" });
|
|
448
453
|
PlatformArtist.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonToPlatformArtistRelations', through: CanonToPlatformArtistRelation, foreignKey: "platformArtistId", otherKey: "canonArtistId" });
|
|
449
454
|
PlatformArtist.belongsToMany(CanonGenre, { as: 'canonGenreIdCanonGenreCanonArtistGenreRelations', through: CanonArtistGenreRelation, foreignKey: "canonArtistId", otherKey: "canonGenreId" });
|
|
@@ -457,6 +462,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
457
462
|
PlatformGenre.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistGenreRelations', through: PlatformArtistGenreRelation, foreignKey: "platformGenreId", otherKey: "platformArtistId" });
|
|
458
463
|
PlatformGenre.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformGenreId", otherKey: "platformTrackId" });
|
|
459
464
|
PlatformTrack.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTrackCanonToPlatformTrackRelations', through: CanonToPlatformTrackRelation, foreignKey: "platformTrackId", otherKey: "canonTrackId" });
|
|
465
|
+
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
460
466
|
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbumPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformTrackId", otherKey: "platformAlbumId" });
|
|
461
467
|
PlatformTrack.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistTrackRelations', through: PlatformArtistTrackRelation, foreignKey: "platformTrackId", otherKey: "platformArtistId" });
|
|
462
468
|
PlatformTrack.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformTrackId", otherKey: "platformGenreId" });
|
|
@@ -486,8 +492,6 @@ export function initModels(sequelize: Sequelize) {
|
|
|
486
492
|
CanonAlbum.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "canonAlbumId"});
|
|
487
493
|
CanonAlbumImageHarvested.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
488
494
|
CanonAlbum.hasMany(CanonAlbumImageHarvested, { as: "canonAlbumImageHarvesteds", foreignKey: "canonAlbumId"});
|
|
489
|
-
CanonAlbumTrackRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
490
|
-
CanonAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId"});
|
|
491
495
|
CanonToPlatformAlbumRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
492
496
|
CanonAlbum.hasMany(CanonToPlatformAlbumRelation, { as: "canonToPlatformAlbumRelations", foreignKey: "canonAlbumId"});
|
|
493
497
|
CanonArtistAlbumRelation.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId"});
|
|
@@ -516,8 +520,6 @@ export function initModels(sequelize: Sequelize) {
|
|
|
516
520
|
CanonMember.hasMany(CanonArtistMemberRelation, { as: "canonArtistMemberRelations", foreignKey: "canonMemberId"});
|
|
517
521
|
CanonMemberExternalReferenceRelation.belongsTo(CanonMember, { as: "canonMember", foreignKey: "canonMemberId"});
|
|
518
522
|
CanonMember.hasMany(CanonMemberExternalReferenceRelation, { as: "canonMemberExternalReferenceRelations", foreignKey: "canonMemberId"});
|
|
519
|
-
CanonAlbumTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId"});
|
|
520
|
-
CanonTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId"});
|
|
521
523
|
CanonArtistTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId"});
|
|
522
524
|
CanonTrack.hasMany(CanonArtistTrackRelation, { as: "canonArtistTrackRelations", foreignKey: "canonTrackId"});
|
|
523
525
|
CanonToPlatformTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId"});
|
|
@@ -580,6 +582,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
580
582
|
PlatformAlbum.hasMany(CanonAlbumGenreRelation, { as: "canonAlbumGenreRelations", foreignKey: "canonAlbumId"});
|
|
581
583
|
CanonAlbumLabelRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
582
584
|
PlatformAlbum.hasMany(CanonAlbumLabelRelation, { as: "canonAlbumLabelRelations", foreignKey: "canonAlbumId"});
|
|
585
|
+
CanonAlbumTrackRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
586
|
+
PlatformAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId"});
|
|
583
587
|
CanonArtistAlbumRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
584
588
|
PlatformAlbum.hasMany(CanonArtistAlbumRelation, { as: "canonArtistAlbumRelations", foreignKey: "canonAlbumId"});
|
|
585
589
|
CanonToPlatformAlbumRelation.belongsTo(PlatformAlbum, { as: "platformAlbum", foreignKey: "platformAlbumId"});
|
|
@@ -616,6 +620,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
616
620
|
PlatformGenre.hasMany(PlatformArtistGenreRelation, { as: "platformArtistGenreRelations", foreignKey: "platformGenreId"});
|
|
617
621
|
PlatformTrackGenreRelation.belongsTo(PlatformGenre, { as: "platformGenre", foreignKey: "platformGenreId"});
|
|
618
622
|
PlatformGenre.hasMany(PlatformTrackGenreRelation, { as: "platformTrackGenreRelations", foreignKey: "platformGenreId"});
|
|
623
|
+
CanonAlbumTrackRelation.belongsTo(PlatformTrack, { as: "canonTrack", foreignKey: "canonTrackId"});
|
|
624
|
+
PlatformTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId"});
|
|
619
625
|
CanonToPlatformTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId"});
|
|
620
626
|
PlatformTrack.hasMany(CanonToPlatformTrackRelation, { as: "canonToPlatformTrackRelations", foreignKey: "platformTrackId"});
|
|
621
627
|
PlatformAlbumTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId"});
|
|
@@ -707,6 +713,7 @@ export function initModels(sequelize: Sequelize) {
|
|
|
707
713
|
PlatformUserPlaylist: PlatformUserPlaylist,
|
|
708
714
|
PlatformUserPlaylistTrack: PlatformUserPlaylistTrack,
|
|
709
715
|
PlaybackStatus: PlaybackStatus,
|
|
716
|
+
PlaybackStatusType: PlaybackStatusType,
|
|
710
717
|
State: State,
|
|
711
718
|
TrackDeletionReason: TrackDeletionReason,
|
|
712
719
|
UnmatchedAlbum: UnmatchedAlbum,
|
package/package.json
CHANGED
package/README
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
= @earbug/db-models =
|