@earbug/db-models 0.0.16 → 0.0.17
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/.github/workflows/publish.yaml +54 -0
- package/.nvmrc +1 -1
- package/dist/AppUser.d.ts +24 -0
- package/dist/CanonArtist.d.ts +21 -21
- package/dist/CanonArtist.js +43 -32
- package/dist/JukeboxSession.d.ts +24 -0
- 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/PlatformUserPlaylist.d.ts +24 -0
- package/dist/RadioShow.d.ts +24 -0
- package/dist/UserComments.d.ts +55 -0
- package/dist/UserComments.js +151 -0
- package/dist/UserLikes.d.ts +45 -0
- package/dist/UserLikes.js +151 -0
- package/dist/init-models.d.ts +8 -2
- package/dist/init-models.js +29 -3
- package/models/AppUser.ts +26 -0
- package/models/CanonArtist.ts +191 -413
- package/models/JukeboxSession.ts +26 -0
- package/models/MerchItem.ts +9 -9
- package/models/MerchOrchestration.ts +9 -9
- package/models/MerchPlatform.ts +8 -8
- package/models/MerchType.ts +6 -6
- package/models/PlatformUserPlaylist.ts +26 -0
- package/models/RadioShow.ts +26 -0
- package/models/UserComments.ts +184 -0
- package/models/UserLikes.ts +173 -0
- package/models/init-models.ts +34 -2
- package/package.json +1 -1
package/models/init-models.ts
CHANGED
|
@@ -165,8 +165,12 @@ import { UnmatchedAlbum as _UnmatchedAlbum } from "./UnmatchedAlbum";
|
|
|
165
165
|
import type { UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes } from "./UnmatchedAlbum";
|
|
166
166
|
import { UnmatchedArtist as _UnmatchedArtist } from "./UnmatchedArtist";
|
|
167
167
|
import type { UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes } from "./UnmatchedArtist";
|
|
168
|
+
import { UserComments as _UserComments } from "./UserComments";
|
|
169
|
+
import type { UserCommentsAttributes, UserCommentsCreationAttributes } from "./UserComments";
|
|
168
170
|
import { UserContacts as _UserContacts } from "./UserContacts";
|
|
169
171
|
import type { UserContactsAttributes, UserContactsCreationAttributes } from "./UserContacts";
|
|
172
|
+
import { UserLikes as _UserLikes } from "./UserLikes";
|
|
173
|
+
import type { UserLikesAttributes, UserLikesCreationAttributes } from "./UserLikes";
|
|
170
174
|
|
|
171
175
|
export {
|
|
172
176
|
_AccessControlPreference as AccessControlPreference,
|
|
@@ -252,7 +256,9 @@ export {
|
|
|
252
256
|
_TrackDeletionReason as TrackDeletionReason,
|
|
253
257
|
_UnmatchedAlbum as UnmatchedAlbum,
|
|
254
258
|
_UnmatchedArtist as UnmatchedArtist,
|
|
259
|
+
_UserComments as UserComments,
|
|
255
260
|
_UserContacts as UserContacts,
|
|
261
|
+
_UserLikes as UserLikes,
|
|
256
262
|
};
|
|
257
263
|
|
|
258
264
|
export type {
|
|
@@ -422,8 +428,12 @@ export type {
|
|
|
422
428
|
UnmatchedAlbumCreationAttributes,
|
|
423
429
|
UnmatchedArtistAttributes,
|
|
424
430
|
UnmatchedArtistCreationAttributes,
|
|
431
|
+
UserCommentsAttributes,
|
|
432
|
+
UserCommentsCreationAttributes,
|
|
425
433
|
UserContactsAttributes,
|
|
426
434
|
UserContactsCreationAttributes,
|
|
435
|
+
UserLikesAttributes,
|
|
436
|
+
UserLikesCreationAttributes,
|
|
427
437
|
};
|
|
428
438
|
|
|
429
439
|
export function initModels(sequelize: Sequelize) {
|
|
@@ -510,7 +520,9 @@ export function initModels(sequelize: Sequelize) {
|
|
|
510
520
|
const TrackDeletionReason = _TrackDeletionReason.initModel(sequelize);
|
|
511
521
|
const UnmatchedAlbum = _UnmatchedAlbum.initModel(sequelize);
|
|
512
522
|
const UnmatchedArtist = _UnmatchedArtist.initModel(sequelize);
|
|
523
|
+
const UserComments = _UserComments.initModel(sequelize);
|
|
513
524
|
const UserContacts = _UserContacts.initModel(sequelize);
|
|
525
|
+
const UserLikes = _UserLikes.initModel(sequelize);
|
|
514
526
|
|
|
515
527
|
CanonAlbum.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
516
528
|
CanonAlbum.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferences', through: CanonAlbumExternalReferenceRelation, foreignKey: "canonAlbumId", otherKey: "externalReferenceId" });
|
|
@@ -582,8 +594,12 @@ export function initModels(sequelize: Sequelize) {
|
|
|
582
594
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId"});
|
|
583
595
|
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId"});
|
|
584
596
|
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId"});
|
|
597
|
+
UserComments.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
598
|
+
AppUser.hasMany(UserComments, { as: "userComments", foreignKey: "appUserId"});
|
|
585
599
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
586
600
|
AppUser.hasMany(UserContacts, { as: "userContacts", foreignKey: "appUserId"});
|
|
601
|
+
UserLikes.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId"});
|
|
602
|
+
AppUser.hasMany(UserLikes, { as: "userLikes", foreignKey: "appUserId"});
|
|
587
603
|
CanonAlbumExternalReferenceRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
588
604
|
CanonAlbum.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "canonAlbumId"});
|
|
589
605
|
CanonAlbumImageHarvested.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId"});
|
|
@@ -666,6 +682,10 @@ export function initModels(sequelize: Sequelize) {
|
|
|
666
682
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId"});
|
|
667
683
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId"});
|
|
668
684
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId"});
|
|
685
|
+
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
686
|
+
JukeboxSession.hasMany(UserComments, { as: "userComments", foreignKey: "jukeboxId"});
|
|
687
|
+
UserLikes.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId"});
|
|
688
|
+
JukeboxSession.hasMany(UserLikes, { as: "userLikes", foreignKey: "jukeboxId"});
|
|
669
689
|
JukeboxSession.belongsTo(JukeboxStatus, { as: "jukeboxStatus", foreignKey: "jukeboxStatusId"});
|
|
670
690
|
JukeboxStatus.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "jukeboxStatusId"});
|
|
671
691
|
JukeboxSession.belongsTo(JukeboxTerminationCondition, { as: "terminationCondition", foreignKey: "terminationConditionId"});
|
|
@@ -764,8 +784,12 @@ export function initModels(sequelize: Sequelize) {
|
|
|
764
784
|
PlatformUserAlbum.hasMany(PlatformUserAlbumTrack, { as: "platformUserAlbumTracks", foreignKey: "platformUserAlbumId"});
|
|
765
785
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId"});
|
|
766
786
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId"});
|
|
767
|
-
|
|
768
|
-
|
|
787
|
+
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
788
|
+
PlatformUserPlaylist.hasMany(UserComments, { as: "userComments", foreignKey: "playlistId"});
|
|
789
|
+
UserLikes.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId"});
|
|
790
|
+
PlatformUserPlaylist.hasMany(UserLikes, { as: "userLikes", foreignKey: "playlistId"});
|
|
791
|
+
JukeboxQueueEntry.belongsTo(PlaybackStatusType, { as: "playbackStatusType", foreignKey: "playbackStatusTypeId"});
|
|
792
|
+
PlaybackStatusType.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "playbackStatusTypeId"});
|
|
769
793
|
RadioShowGenres.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
770
794
|
RadioShow.hasMany(RadioShowGenres, { as: "radioShowGenres", foreignKey: "radioShowId"});
|
|
771
795
|
RadioShowMedia.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
@@ -774,6 +798,10 @@ export function initModels(sequelize: Sequelize) {
|
|
|
774
798
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId"});
|
|
775
799
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
776
800
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId"});
|
|
801
|
+
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
802
|
+
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId"});
|
|
803
|
+
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId"});
|
|
804
|
+
RadioShow.hasMany(UserLikes, { as: "userLikes", foreignKey: "radioShowId"});
|
|
777
805
|
AppUser.belongsTo(State, { as: "state", foreignKey: "stateId"});
|
|
778
806
|
State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId"});
|
|
779
807
|
PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId"});
|
|
@@ -782,6 +810,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
782
810
|
State.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "stateId"});
|
|
783
811
|
JukeboxQueueEntry.belongsTo(TrackDeletionReason, { as: "trackDeletionReason", foreignKey: "trackDeletionReasonId"});
|
|
784
812
|
TrackDeletionReason.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackDeletionReasonId"});
|
|
813
|
+
UserComments.belongsTo(UserComments, { as: "replyComment", foreignKey: "replyCommentId"});
|
|
814
|
+
UserComments.hasMany(UserComments, { as: "userComments", foreignKey: "replyCommentId"});
|
|
785
815
|
|
|
786
816
|
return {
|
|
787
817
|
AccessControlPreference: AccessControlPreference,
|
|
@@ -867,6 +897,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
867
897
|
TrackDeletionReason: TrackDeletionReason,
|
|
868
898
|
UnmatchedAlbum: UnmatchedAlbum,
|
|
869
899
|
UnmatchedArtist: UnmatchedArtist,
|
|
900
|
+
UserComments: UserComments,
|
|
870
901
|
UserContacts: UserContacts,
|
|
902
|
+
UserLikes: UserLikes,
|
|
871
903
|
};
|
|
872
904
|
}
|