@earbug/db-models 0.0.4 → 0.0.5
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 +5 -1
- package/dist/PlatformArtist.js +10 -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 +15 -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/dist/init-models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlatformAlbumGenreRelation = exports.PlatformAlbum = exports.Platform = exports.PauseStatusType = exports.NewsSite = exports.MetricsEvent = exports.MetricsDaily = exports.KnexMigrationsLock = exports.KnexMigrations = exports.JukeboxUserType = exports.JukeboxUser = exports.JukeboxType = exports.JukeboxTerminationCondition = exports.JukeboxStatus = exports.JukeboxSession = exports.JukeboxQueueMode = exports.JukeboxQueueEntry = exports.JukeboxInvite = exports.JukeboxCanonGenreRelation = exports.JukeboxAccessType = 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 = void 0;
|
|
4
|
-
exports.UserContacts = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = 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 = void 0;
|
|
4
|
+
exports.UserContacts = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = 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 = void 0;
|
|
5
5
|
exports.initModels = initModels;
|
|
6
6
|
const AppUser_1 = require("./AppUser");
|
|
7
7
|
Object.defineProperty(exports, "AppUser", { enumerable: true, get: function () { return AppUser_1.AppUser; } });
|
|
@@ -129,6 +129,8 @@ const PlatformUserPlaylistTrack_1 = require("./PlatformUserPlaylistTrack");
|
|
|
129
129
|
Object.defineProperty(exports, "PlatformUserPlaylistTrack", { enumerable: true, get: function () { return PlatformUserPlaylistTrack_1.PlatformUserPlaylistTrack; } });
|
|
130
130
|
const PlaybackStatus_1 = require("./PlaybackStatus");
|
|
131
131
|
Object.defineProperty(exports, "PlaybackStatus", { enumerable: true, get: function () { return PlaybackStatus_1.PlaybackStatus; } });
|
|
132
|
+
const PlaybackStatusType_1 = require("./PlaybackStatusType");
|
|
133
|
+
Object.defineProperty(exports, "PlaybackStatusType", { enumerable: true, get: function () { return PlaybackStatusType_1.PlaybackStatusType; } });
|
|
132
134
|
const State_1 = require("./State");
|
|
133
135
|
Object.defineProperty(exports, "State", { enumerable: true, get: function () { return State_1.State; } });
|
|
134
136
|
const TrackDeletionReason_1 = require("./TrackDeletionReason");
|
|
@@ -203,15 +205,15 @@ function initModels(sequelize) {
|
|
|
203
205
|
const PlatformUserPlaylist = PlatformUserPlaylist_1.PlatformUserPlaylist.initModel(sequelize);
|
|
204
206
|
const PlatformUserPlaylistTrack = PlatformUserPlaylistTrack_1.PlatformUserPlaylistTrack.initModel(sequelize);
|
|
205
207
|
const PlaybackStatus = PlaybackStatus_1.PlaybackStatus.initModel(sequelize);
|
|
208
|
+
const PlaybackStatusType = PlaybackStatusType_1.PlaybackStatusType.initModel(sequelize);
|
|
206
209
|
const State = State_1.State.initModel(sequelize);
|
|
207
210
|
const TrackDeletionReason = TrackDeletionReason_1.TrackDeletionReason.initModel(sequelize);
|
|
208
211
|
const UnmatchedAlbum = UnmatchedAlbum_1.UnmatchedAlbum.initModel(sequelize);
|
|
209
212
|
const UnmatchedArtist = UnmatchedArtist_1.UnmatchedArtist.initModel(sequelize);
|
|
210
213
|
const UserContacts = UserContacts_1.UserContacts.initModel(sequelize);
|
|
211
|
-
CanonAlbum.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
212
214
|
CanonAlbum.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferences', through: CanonAlbumExternalReferenceRelation, foreignKey: "canonAlbumId", otherKey: "externalReferenceId" });
|
|
213
215
|
CanonAlbum.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbums', through: CanonToPlatformAlbumRelation, foreignKey: "canonAlbumId", otherKey: "platformAlbumId" });
|
|
214
|
-
CanonArtist.belongsToMany(CanonTrack, { as: '
|
|
216
|
+
CanonArtist.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonArtistTrackRelation, foreignKey: "canonArtistId", otherKey: "canonTrackId" });
|
|
215
217
|
CanonArtist.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonArtistAlbumRelations', through: CanonArtistAlbumRelation, foreignKey: "canonArtistId", otherKey: "canonAlbumId" });
|
|
216
218
|
CanonArtist.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtists', through: CanonToPlatformArtistRelation, foreignKey: "canonArtistId", otherKey: "platformArtistId" });
|
|
217
219
|
CanonGenre.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations', through: CanonGenreExternalReferenceRelation, foreignKey: "canonGenreId", otherKey: "externalReferenceId" });
|
|
@@ -222,7 +224,6 @@ function initModels(sequelize) {
|
|
|
222
224
|
CanonLabel.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumLabelRelations', through: CanonAlbumLabelRelation, foreignKey: "canonLabelId", otherKey: "canonAlbumId" });
|
|
223
225
|
CanonMember.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonMemberExternalReferenceRelations', through: CanonMemberExternalReferenceRelation, foreignKey: "canonMemberId", otherKey: "externalReferenceId" });
|
|
224
226
|
CanonMember.belongsToMany(PlatformArtist, { as: 'canonArtistIdPlatformArtistCanonArtistMemberRelations', through: CanonArtistMemberRelation, foreignKey: "canonMemberId", otherKey: "canonArtistId" });
|
|
225
|
-
CanonTrack.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
226
227
|
CanonTrack.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonArtistTrackRelations', through: CanonArtistTrackRelation, foreignKey: "canonTrackId", otherKey: "canonArtistId" });
|
|
227
228
|
CanonTrack.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTracks', through: CanonToPlatformTrackRelation, foreignKey: "canonTrackId", otherKey: "platformTrackId" });
|
|
228
229
|
ExternalReference.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbums', through: CanonAlbumExternalReferenceRelation, foreignKey: "externalReferenceId", otherKey: "canonAlbumId" });
|
|
@@ -236,6 +237,7 @@ function initModels(sequelize) {
|
|
|
236
237
|
PlatformAlbum.belongsToMany(CanonLabel, { as: 'canonLabelIdCanonLabels', through: CanonAlbumLabelRelation, foreignKey: "canonAlbumId", otherKey: "canonLabelId" });
|
|
237
238
|
PlatformAlbum.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistAlbumRelations', through: PlatformArtistAlbumRelation, foreignKey: "platformAlbumId", otherKey: "platformArtistId" });
|
|
238
239
|
PlatformAlbum.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformAlbumGenreRelations', through: PlatformAlbumGenreRelation, foreignKey: "platformAlbumId", otherKey: "platformGenreId" });
|
|
240
|
+
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'canonTrackIdPlatformTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
239
241
|
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformAlbumId", otherKey: "platformTrackId" });
|
|
240
242
|
PlatformArtist.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonToPlatformArtistRelations', through: CanonToPlatformArtistRelation, foreignKey: "platformArtistId", otherKey: "canonArtistId" });
|
|
241
243
|
PlatformArtist.belongsToMany(CanonGenre, { as: 'canonGenreIdCanonGenreCanonArtistGenreRelations', through: CanonArtistGenreRelation, foreignKey: "canonArtistId", otherKey: "canonGenreId" });
|
|
@@ -249,6 +251,7 @@ function initModels(sequelize) {
|
|
|
249
251
|
PlatformGenre.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistGenreRelations', through: PlatformArtistGenreRelation, foreignKey: "platformGenreId", otherKey: "platformArtistId" });
|
|
250
252
|
PlatformGenre.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformGenreId", otherKey: "platformTrackId" });
|
|
251
253
|
PlatformTrack.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTrackCanonToPlatformTrackRelations', through: CanonToPlatformTrackRelation, foreignKey: "platformTrackId", otherKey: "canonTrackId" });
|
|
254
|
+
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
252
255
|
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbumPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformTrackId", otherKey: "platformAlbumId" });
|
|
253
256
|
PlatformTrack.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistTrackRelations', through: PlatformArtistTrackRelation, foreignKey: "platformTrackId", otherKey: "platformArtistId" });
|
|
254
257
|
PlatformTrack.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformTrackId", otherKey: "platformGenreId" });
|
|
@@ -278,8 +281,6 @@ function initModels(sequelize) {
|
|
|
278
281
|
CanonAlbum.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "canonAlbumId" });
|
|
279
282
|
CanonAlbumImageHarvested.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
280
283
|
CanonAlbum.hasMany(CanonAlbumImageHarvested, { as: "canonAlbumImageHarvesteds", foreignKey: "canonAlbumId" });
|
|
281
|
-
CanonAlbumTrackRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
282
|
-
CanonAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId" });
|
|
283
284
|
CanonToPlatformAlbumRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
284
285
|
CanonAlbum.hasMany(CanonToPlatformAlbumRelation, { as: "canonToPlatformAlbumRelations", foreignKey: "canonAlbumId" });
|
|
285
286
|
CanonArtistAlbumRelation.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
@@ -308,8 +309,6 @@ function initModels(sequelize) {
|
|
|
308
309
|
CanonMember.hasMany(CanonArtistMemberRelation, { as: "canonArtistMemberRelations", foreignKey: "canonMemberId" });
|
|
309
310
|
CanonMemberExternalReferenceRelation.belongsTo(CanonMember, { as: "canonMember", foreignKey: "canonMemberId" });
|
|
310
311
|
CanonMember.hasMany(CanonMemberExternalReferenceRelation, { as: "canonMemberExternalReferenceRelations", foreignKey: "canonMemberId" });
|
|
311
|
-
CanonAlbumTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
312
|
-
CanonTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId" });
|
|
313
312
|
CanonArtistTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
314
313
|
CanonTrack.hasMany(CanonArtistTrackRelation, { as: "canonArtistTrackRelations", foreignKey: "canonTrackId" });
|
|
315
314
|
CanonToPlatformTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
@@ -372,6 +371,8 @@ function initModels(sequelize) {
|
|
|
372
371
|
PlatformAlbum.hasMany(CanonAlbumGenreRelation, { as: "canonAlbumGenreRelations", foreignKey: "canonAlbumId" });
|
|
373
372
|
CanonAlbumLabelRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
374
373
|
PlatformAlbum.hasMany(CanonAlbumLabelRelation, { as: "canonAlbumLabelRelations", foreignKey: "canonAlbumId" });
|
|
374
|
+
CanonAlbumTrackRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
375
|
+
PlatformAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId" });
|
|
375
376
|
CanonArtistAlbumRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
376
377
|
PlatformAlbum.hasMany(CanonArtistAlbumRelation, { as: "canonArtistAlbumRelations", foreignKey: "canonAlbumId" });
|
|
377
378
|
CanonToPlatformAlbumRelation.belongsTo(PlatformAlbum, { as: "platformAlbum", foreignKey: "platformAlbumId" });
|
|
@@ -408,6 +409,8 @@ function initModels(sequelize) {
|
|
|
408
409
|
PlatformGenre.hasMany(PlatformArtistGenreRelation, { as: "platformArtistGenreRelations", foreignKey: "platformGenreId" });
|
|
409
410
|
PlatformTrackGenreRelation.belongsTo(PlatformGenre, { as: "platformGenre", foreignKey: "platformGenreId" });
|
|
410
411
|
PlatformGenre.hasMany(PlatformTrackGenreRelation, { as: "platformTrackGenreRelations", foreignKey: "platformGenreId" });
|
|
412
|
+
CanonAlbumTrackRelation.belongsTo(PlatformTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
413
|
+
PlatformTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId" });
|
|
411
414
|
CanonToPlatformTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId" });
|
|
412
415
|
PlatformTrack.hasMany(CanonToPlatformTrackRelation, { as: "canonToPlatformTrackRelations", foreignKey: "platformTrackId" });
|
|
413
416
|
PlatformAlbumTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId" });
|
|
@@ -498,6 +501,7 @@ function initModels(sequelize) {
|
|
|
498
501
|
PlatformUserPlaylist: PlatformUserPlaylist,
|
|
499
502
|
PlatformUserPlaylistTrack: PlatformUserPlaylistTrack,
|
|
500
503
|
PlaybackStatus: PlaybackStatus,
|
|
504
|
+
PlaybackStatusType: PlaybackStatusType,
|
|
501
505
|
State: State,
|
|
502
506
|
TrackDeletionReason: TrackDeletionReason,
|
|
503
507
|
UnmatchedAlbum: UnmatchedAlbum,
|
package/models/AppUserDevice.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
5
5
|
export interface AppUserDeviceAttributes {
|
|
6
6
|
id: string;
|
|
7
7
|
appUserId: string;
|
|
8
|
-
|
|
8
|
+
platformId: number;
|
|
9
9
|
endpointArn: string;
|
|
10
10
|
createdAt: Date;
|
|
11
11
|
}
|
|
@@ -18,7 +18,7 @@ export type AppUserDeviceCreationAttributes = Optional<AppUserDeviceAttributes,
|
|
|
18
18
|
export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceCreationAttributes> implements AppUserDeviceAttributes {
|
|
19
19
|
id!: string;
|
|
20
20
|
appUserId!: string;
|
|
21
|
-
|
|
21
|
+
platformId!: number;
|
|
22
22
|
endpointArn!: string;
|
|
23
23
|
createdAt!: Date;
|
|
24
24
|
|
|
@@ -45,10 +45,10 @@ export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceC
|
|
|
45
45
|
},
|
|
46
46
|
field: 'app_user_id'
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
platformId: {
|
|
49
49
|
type: DataTypes.SMALLINT,
|
|
50
50
|
allowNull: false,
|
|
51
|
-
field: '
|
|
51
|
+
field: 'platform_id'
|
|
52
52
|
},
|
|
53
53
|
endpointArn: {
|
|
54
54
|
type: DataTypes.TEXT,
|
package/models/CanonAlbum.ts
CHANGED
|
@@ -2,9 +2,7 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
3
|
import type { CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId } from './CanonAlbumExternalReferenceRelation';
|
|
4
4
|
import type { CanonAlbumImageHarvested, CanonAlbumImageHarvestedId } from './CanonAlbumImageHarvested';
|
|
5
|
-
import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
|
|
6
5
|
import type { CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId } from './CanonToPlatformAlbumRelation';
|
|
7
|
-
import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
8
6
|
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
9
7
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
10
8
|
|
|
@@ -66,18 +64,6 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
66
64
|
hasCanonAlbumImageHarvested!: Sequelize.HasManyHasAssociationMixin<CanonAlbumImageHarvested, CanonAlbumImageHarvestedId>;
|
|
67
65
|
hasCanonAlbumImageHarvesteds!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumImageHarvested, CanonAlbumImageHarvestedId>;
|
|
68
66
|
countCanonAlbumImageHarvesteds!: Sequelize.HasManyCountAssociationsMixin;
|
|
69
|
-
// CanonAlbum hasMany CanonAlbumTrackRelation via canonAlbumId
|
|
70
|
-
canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
|
|
71
|
-
getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
|
|
72
|
-
setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
73
|
-
addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
74
|
-
addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
75
|
-
createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
|
|
76
|
-
removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
77
|
-
removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
78
|
-
hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
79
|
-
hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
80
|
-
countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
81
67
|
// CanonAlbum hasMany CanonToPlatformAlbumRelation via canonAlbumId
|
|
82
68
|
canonToPlatformAlbumRelations!: CanonToPlatformAlbumRelation[];
|
|
83
69
|
getCanonToPlatformAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformAlbumRelation>;
|
|
@@ -90,18 +76,6 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
90
76
|
hasCanonToPlatformAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
91
77
|
hasCanonToPlatformAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
92
78
|
countCanonToPlatformAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
93
|
-
// CanonAlbum belongsToMany CanonTrack via canonAlbumId and canonTrackId
|
|
94
|
-
canonTrackIdCanonTracks!: CanonTrack[];
|
|
95
|
-
getCanonTrackIdCanonTracks!: Sequelize.BelongsToManyGetAssociationsMixin<CanonTrack>;
|
|
96
|
-
setCanonTrackIdCanonTracks!: Sequelize.BelongsToManySetAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
97
|
-
addCanonTrackIdCanonTrack!: Sequelize.BelongsToManyAddAssociationMixin<CanonTrack, CanonTrackId>;
|
|
98
|
-
addCanonTrackIdCanonTracks!: Sequelize.BelongsToManyAddAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
99
|
-
createCanonTrackIdCanonTrack!: Sequelize.BelongsToManyCreateAssociationMixin<CanonTrack>;
|
|
100
|
-
removeCanonTrackIdCanonTrack!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonTrack, CanonTrackId>;
|
|
101
|
-
removeCanonTrackIdCanonTracks!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
102
|
-
hasCanonTrackIdCanonTrack!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
|
|
103
|
-
hasCanonTrackIdCanonTracks!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
104
|
-
countCanonTrackIdCanonTracks!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
105
79
|
// CanonAlbum belongsToMany ExternalReference via canonAlbumId and externalReferenceId
|
|
106
80
|
externalReferenceIdExternalReferences!: ExternalReference[];
|
|
107
81
|
getExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
4
|
+
import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
5
5
|
|
|
6
6
|
export interface CanonAlbumTrackRelationAttributes {
|
|
7
7
|
canonAlbumId: string;
|
|
@@ -21,16 +21,16 @@ export class CanonAlbumTrackRelation extends Model<CanonAlbumTrackRelationAttrib
|
|
|
21
21
|
createDate!: Date;
|
|
22
22
|
updateDate!: Date;
|
|
23
23
|
|
|
24
|
-
// CanonAlbumTrackRelation belongsTo
|
|
25
|
-
canonAlbum!:
|
|
26
|
-
getCanonAlbum!: Sequelize.BelongsToGetAssociationMixin<
|
|
27
|
-
setCanonAlbum!: Sequelize.BelongsToSetAssociationMixin<
|
|
28
|
-
createCanonAlbum!: Sequelize.BelongsToCreateAssociationMixin<
|
|
29
|
-
// CanonAlbumTrackRelation belongsTo
|
|
30
|
-
canonTrack!:
|
|
31
|
-
getCanonTrack!: Sequelize.BelongsToGetAssociationMixin<
|
|
32
|
-
setCanonTrack!: Sequelize.BelongsToSetAssociationMixin<
|
|
33
|
-
createCanonTrack!: Sequelize.BelongsToCreateAssociationMixin<
|
|
24
|
+
// CanonAlbumTrackRelation belongsTo PlatformAlbum via canonAlbumId
|
|
25
|
+
canonAlbum!: PlatformAlbum;
|
|
26
|
+
getCanonAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
|
|
27
|
+
setCanonAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
28
|
+
createCanonAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
|
|
29
|
+
// CanonAlbumTrackRelation belongsTo PlatformTrack via canonTrackId
|
|
30
|
+
canonTrack!: PlatformTrack;
|
|
31
|
+
getCanonTrack!: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
|
|
32
|
+
setCanonTrack!: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
33
|
+
createCanonTrack!: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
|
|
34
34
|
|
|
35
35
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonAlbumTrackRelation {
|
|
36
36
|
return CanonAlbumTrackRelation.init({
|
|
@@ -39,7 +39,7 @@ export class CanonAlbumTrackRelation extends Model<CanonAlbumTrackRelationAttrib
|
|
|
39
39
|
allowNull: false,
|
|
40
40
|
primaryKey: true,
|
|
41
41
|
references: {
|
|
42
|
-
model: '
|
|
42
|
+
model: 'platform_album',
|
|
43
43
|
key: 'id'
|
|
44
44
|
},
|
|
45
45
|
field: 'canon_album_id'
|
|
@@ -49,7 +49,7 @@ export class CanonAlbumTrackRelation extends Model<CanonAlbumTrackRelationAttrib
|
|
|
49
49
|
allowNull: false,
|
|
50
50
|
primaryKey: true,
|
|
51
51
|
references: {
|
|
52
|
-
model: '
|
|
52
|
+
model: 'platform_track',
|
|
53
53
|
key: 'id'
|
|
54
54
|
},
|
|
55
55
|
field: 'canon_track_id'
|
package/models/CanonArtist.ts
CHANGED
|
@@ -87,17 +87,17 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
87
87
|
hasCanonToPlatformArtistRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
88
88
|
countCanonToPlatformArtistRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
89
89
|
// CanonArtist belongsToMany CanonTrack via canonArtistId and canonTrackId
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
canonTrackIdCanonTracks!: CanonTrack[];
|
|
91
|
+
getCanonTrackIdCanonTracks!: Sequelize.BelongsToManyGetAssociationsMixin<CanonTrack>;
|
|
92
|
+
setCanonTrackIdCanonTracks!: Sequelize.BelongsToManySetAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
93
|
+
addCanonTrackIdCanonTrack!: Sequelize.BelongsToManyAddAssociationMixin<CanonTrack, CanonTrackId>;
|
|
94
|
+
addCanonTrackIdCanonTracks!: Sequelize.BelongsToManyAddAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
95
|
+
createCanonTrackIdCanonTrack!: Sequelize.BelongsToManyCreateAssociationMixin<CanonTrack>;
|
|
96
|
+
removeCanonTrackIdCanonTrack!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonTrack, CanonTrackId>;
|
|
97
|
+
removeCanonTrackIdCanonTracks!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
98
|
+
hasCanonTrackIdCanonTrack!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
|
|
99
|
+
hasCanonTrackIdCanonTracks!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
100
|
+
countCanonTrackIdCanonTracks!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
101
101
|
// CanonArtist belongsToMany PlatformAlbum via canonArtistId and canonAlbumId
|
|
102
102
|
canonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: PlatformAlbum[];
|
|
103
103
|
getCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
package/models/CanonTrack.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
|
|
4
|
-
import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
|
|
5
3
|
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
6
4
|
import type { CanonArtistTrackRelation, CanonArtistTrackRelationId } from './CanonArtistTrackRelation';
|
|
7
5
|
import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
|
|
@@ -36,30 +34,6 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
|
|
|
36
34
|
updateDate!: Date;
|
|
37
35
|
durationMs!: number;
|
|
38
36
|
|
|
39
|
-
// CanonTrack belongsToMany CanonAlbum via canonTrackId and canonAlbumId
|
|
40
|
-
canonAlbumIdCanonAlbumCanonAlbumTrackRelations!: CanonAlbum[];
|
|
41
|
-
getCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonAlbum>;
|
|
42
|
-
setCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonAlbum, CanonAlbumId>;
|
|
43
|
-
addCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonAlbum, CanonAlbumId>;
|
|
44
|
-
addCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonAlbum, CanonAlbumId>;
|
|
45
|
-
createCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonAlbum>;
|
|
46
|
-
removeCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonAlbum, CanonAlbumId>;
|
|
47
|
-
removeCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonAlbum, CanonAlbumId>;
|
|
48
|
-
hasCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonAlbum, CanonAlbumId>;
|
|
49
|
-
hasCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonAlbum, CanonAlbumId>;
|
|
50
|
-
countCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
51
|
-
// CanonTrack hasMany CanonAlbumTrackRelation via canonTrackId
|
|
52
|
-
canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
|
|
53
|
-
getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
|
|
54
|
-
setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
55
|
-
addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
56
|
-
addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
57
|
-
createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
|
|
58
|
-
removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
59
|
-
removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
60
|
-
hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
61
|
-
hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
62
|
-
countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
63
37
|
// CanonTrack belongsToMany CanonArtist via canonTrackId and canonArtistId
|
|
64
38
|
canonArtistIdCanonArtistCanonArtistTrackRelations!: CanonArtist[];
|
|
65
39
|
getCanonArtistIdCanonArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
|
|
@@ -14,7 +14,7 @@ export interface JukeboxCanonGenreRelationAttributes {
|
|
|
14
14
|
|
|
15
15
|
export type JukeboxCanonGenreRelationPk = "id";
|
|
16
16
|
export type JukeboxCanonGenreRelationId = JukeboxCanonGenreRelation[JukeboxCanonGenreRelationPk];
|
|
17
|
-
export type JukeboxCanonGenreRelationOptionalAttributes = "id" | "
|
|
17
|
+
export type JukeboxCanonGenreRelationOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
18
18
|
export type JukeboxCanonGenreRelationCreationAttributes = Optional<JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationOptionalAttributes>;
|
|
19
19
|
|
|
20
20
|
export class JukeboxCanonGenreRelation extends Model<JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationCreationAttributes> implements JukeboxCanonGenreRelationAttributes {
|
|
@@ -67,7 +67,6 @@ export class JukeboxCanonGenreRelation extends Model<JukeboxCanonGenreRelationAt
|
|
|
67
67
|
stateId: {
|
|
68
68
|
type: DataTypes.SMALLINT,
|
|
69
69
|
allowNull: false,
|
|
70
|
-
defaultValue: 0,
|
|
71
70
|
field: 'state_id'
|
|
72
71
|
},
|
|
73
72
|
createdAt: {
|
package/models/PlatformAlbum.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DataTypes, Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
|
|
4
4
|
import type { CanonAlbumGenreRelation, CanonAlbumGenreRelationId } from './CanonAlbumGenreRelation';
|
|
5
5
|
import type { CanonAlbumLabelRelation, CanonAlbumLabelRelationId } from './CanonAlbumLabelRelation';
|
|
6
|
+
import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
|
|
6
7
|
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
7
8
|
import type { CanonArtistAlbumRelation, CanonArtistAlbumRelationId } from './CanonArtistAlbumRelation';
|
|
8
9
|
import type { CanonGenre, CanonGenreId } from './CanonGenre';
|
|
@@ -31,11 +32,13 @@ export interface PlatformAlbumAttributes {
|
|
|
31
32
|
createDate: Date;
|
|
32
33
|
updateDate: Date;
|
|
33
34
|
images?: object;
|
|
35
|
+
lastHarvestDate?: Date;
|
|
36
|
+
lastHarvestLog?: string;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export type PlatformAlbumPk = "id";
|
|
37
40
|
export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
|
|
38
|
-
export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images";
|
|
41
|
+
export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images" | "lastHarvestDate" | "lastHarvestLog";
|
|
39
42
|
export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
|
|
40
43
|
|
|
41
44
|
export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
|
|
@@ -51,6 +54,8 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
51
54
|
createDate!: Date;
|
|
52
55
|
updateDate!: Date;
|
|
53
56
|
images?: object;
|
|
57
|
+
lastHarvestDate?: Date;
|
|
58
|
+
lastHarvestLog?: string;
|
|
54
59
|
|
|
55
60
|
// PlatformAlbum belongsTo Platform via platformId
|
|
56
61
|
platform!: Platform;
|
|
@@ -93,6 +98,18 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
93
98
|
hasCanonAlbumLabelRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
94
99
|
hasCanonAlbumLabelRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
95
100
|
countCanonAlbumLabelRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
101
|
+
// PlatformAlbum hasMany CanonAlbumTrackRelation via canonAlbumId
|
|
102
|
+
canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
|
|
103
|
+
getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
|
|
104
|
+
setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
105
|
+
addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
106
|
+
addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
107
|
+
createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
|
|
108
|
+
removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
109
|
+
removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
110
|
+
hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
111
|
+
hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
112
|
+
countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
96
113
|
// PlatformAlbum belongsToMany CanonArtist via canonAlbumId and canonArtistId
|
|
97
114
|
canonArtistIdCanonArtists!: CanonArtist[];
|
|
98
115
|
getCanonArtistIdCanonArtists!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
|
|
@@ -213,6 +230,18 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
213
230
|
hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
214
231
|
hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
215
232
|
countPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
233
|
+
// PlatformAlbum belongsToMany PlatformTrack via canonAlbumId and canonTrackId
|
|
234
|
+
canonTrackIdPlatformTracks!: PlatformTrack[];
|
|
235
|
+
getCanonTrackIdPlatformTracks!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
|
|
236
|
+
setCanonTrackIdPlatformTracks!: Sequelize.BelongsToManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
|
|
237
|
+
addCanonTrackIdPlatformTrack!: Sequelize.BelongsToManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
238
|
+
addCanonTrackIdPlatformTracks!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
|
|
239
|
+
createCanonTrackIdPlatformTrack!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformTrack>;
|
|
240
|
+
removeCanonTrackIdPlatformTrack!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
241
|
+
removeCanonTrackIdPlatformTracks!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
|
|
242
|
+
hasCanonTrackIdPlatformTrack!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
243
|
+
hasCanonTrackIdPlatformTracks!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
|
|
244
|
+
countCanonTrackIdPlatformTracks!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
216
245
|
// PlatformAlbum belongsToMany PlatformTrack via platformAlbumId and platformTrackId
|
|
217
246
|
platformTrackIdPlatformTrackPlatformAlbumTrackRelations!: PlatformTrack[];
|
|
218
247
|
getPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
|
|
@@ -317,6 +346,16 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
317
346
|
images: {
|
|
318
347
|
type: DataTypes.JSONB,
|
|
319
348
|
allowNull: true
|
|
349
|
+
},
|
|
350
|
+
lastHarvestDate: {
|
|
351
|
+
type: DataTypes.DATE,
|
|
352
|
+
allowNull: true,
|
|
353
|
+
field: 'last_harvest_date'
|
|
354
|
+
},
|
|
355
|
+
lastHarvestLog: {
|
|
356
|
+
type: DataTypes.TEXT,
|
|
357
|
+
allowNull: true,
|
|
358
|
+
field: 'last_harvest_log'
|
|
320
359
|
}
|
|
321
360
|
}, {
|
|
322
361
|
sequelize,
|
package/models/PlatformArtist.ts
CHANGED
|
@@ -26,11 +26,13 @@ export interface PlatformArtistAttributes {
|
|
|
26
26
|
createDate: Date;
|
|
27
27
|
updateDate: Date;
|
|
28
28
|
genres?: string[];
|
|
29
|
+
lastHarvestDate?: Date;
|
|
30
|
+
lastHarvestLog?: string;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export type PlatformArtistPk = "id";
|
|
32
34
|
export type PlatformArtistId = PlatformArtist[PlatformArtistPk];
|
|
33
|
-
export type PlatformArtistOptionalAttributes = "id" | "externalUri" | "createDate" | "updateDate" | "genres";
|
|
35
|
+
export type PlatformArtistOptionalAttributes = "id" | "externalUri" | "createDate" | "updateDate" | "genres" | "lastHarvestDate" | "lastHarvestLog";
|
|
34
36
|
export type PlatformArtistCreationAttributes = Optional<PlatformArtistAttributes, PlatformArtistOptionalAttributes>;
|
|
35
37
|
|
|
36
38
|
export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArtistCreationAttributes> implements PlatformArtistAttributes {
|
|
@@ -43,6 +45,8 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
|
|
|
43
45
|
createDate!: Date;
|
|
44
46
|
updateDate!: Date;
|
|
45
47
|
genres?: string[];
|
|
48
|
+
lastHarvestDate?: Date;
|
|
49
|
+
lastHarvestLog?: string;
|
|
46
50
|
|
|
47
51
|
// PlatformArtist belongsTo Platform via platformId
|
|
48
52
|
platform!: Platform;
|
|
@@ -271,6 +275,16 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
|
|
|
271
275
|
genres: {
|
|
272
276
|
type: DataTypes.ARRAY(DataTypes.TEXT),
|
|
273
277
|
allowNull: true
|
|
278
|
+
},
|
|
279
|
+
lastHarvestDate: {
|
|
280
|
+
type: DataTypes.DATE,
|
|
281
|
+
allowNull: true,
|
|
282
|
+
field: 'last_harvest_date'
|
|
283
|
+
},
|
|
284
|
+
lastHarvestLog: {
|
|
285
|
+
type: DataTypes.TEXT,
|
|
286
|
+
allowNull: true,
|
|
287
|
+
field: 'last_harvest_log'
|
|
274
288
|
}
|
|
275
289
|
}, {
|
|
276
290
|
sequelize,
|
package/models/PlatformTrack.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
|
|
3
4
|
import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
|
|
4
5
|
import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
5
6
|
import type { Platform, PlatformId } from './Platform';
|
|
@@ -25,11 +26,13 @@ export interface PlatformTrackAttributes {
|
|
|
25
26
|
discTrackNumber?: number;
|
|
26
27
|
createDate: Date;
|
|
27
28
|
updateDate: Date;
|
|
29
|
+
lastHarvestDate?: Date;
|
|
30
|
+
lastHarvestLog?: string;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
export type PlatformTrackPk = "id";
|
|
31
34
|
export type PlatformTrackId = PlatformTrack[PlatformTrackPk];
|
|
32
|
-
export type PlatformTrackOptionalAttributes = "id" | "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate";
|
|
35
|
+
export type PlatformTrackOptionalAttributes = "id" | "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
|
|
33
36
|
export type PlatformTrackCreationAttributes = Optional<PlatformTrackAttributes, PlatformTrackOptionalAttributes>;
|
|
34
37
|
|
|
35
38
|
export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackCreationAttributes> implements PlatformTrackAttributes {
|
|
@@ -45,12 +48,26 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
45
48
|
discTrackNumber?: number;
|
|
46
49
|
createDate!: Date;
|
|
47
50
|
updateDate!: Date;
|
|
51
|
+
lastHarvestDate?: Date;
|
|
52
|
+
lastHarvestLog?: string;
|
|
48
53
|
|
|
49
54
|
// PlatformTrack belongsTo Platform via platformId
|
|
50
55
|
platform!: Platform;
|
|
51
56
|
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
52
57
|
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
53
58
|
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
59
|
+
// PlatformTrack hasMany CanonAlbumTrackRelation via canonTrackId
|
|
60
|
+
canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
|
|
61
|
+
getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
|
|
62
|
+
setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
63
|
+
addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
64
|
+
addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
65
|
+
createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
|
|
66
|
+
removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
67
|
+
removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
68
|
+
hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
69
|
+
hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
70
|
+
countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
54
71
|
// PlatformTrack hasMany CanonToPlatformTrackRelation via platformTrackId
|
|
55
72
|
canonToPlatformTrackRelations!: CanonToPlatformTrackRelation[];
|
|
56
73
|
getCanonToPlatformTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformTrackRelation>;
|
|
@@ -75,6 +92,18 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
75
92
|
hasCanonTrackIdCanonTrackCanonToPlatformTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
|
|
76
93
|
hasCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
77
94
|
countCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
95
|
+
// PlatformTrack belongsToMany PlatformAlbum via canonTrackId and canonAlbumId
|
|
96
|
+
canonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: PlatformAlbum[];
|
|
97
|
+
getCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
98
|
+
setCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
99
|
+
addCanonAlbumIdPlatformAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
100
|
+
addCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
101
|
+
createCanonAlbumIdPlatformAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
|
|
102
|
+
removeCanonAlbumIdPlatformAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
103
|
+
removeCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
104
|
+
hasCanonAlbumIdPlatformAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
105
|
+
hasCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
106
|
+
countCanonAlbumIdPlatformAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
78
107
|
// PlatformTrack belongsToMany PlatformAlbum via platformTrackId and platformAlbumId
|
|
79
108
|
platformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: PlatformAlbum[];
|
|
80
109
|
getPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
@@ -239,6 +268,16 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
239
268
|
allowNull: false,
|
|
240
269
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
241
270
|
field: 'update_date'
|
|
271
|
+
},
|
|
272
|
+
lastHarvestDate: {
|
|
273
|
+
type: DataTypes.DATE,
|
|
274
|
+
allowNull: true,
|
|
275
|
+
field: 'last_harvest_date'
|
|
276
|
+
},
|
|
277
|
+
lastHarvestLog: {
|
|
278
|
+
type: DataTypes.TEXT,
|
|
279
|
+
allowNull: true,
|
|
280
|
+
field: 'last_harvest_log'
|
|
242
281
|
}
|
|
243
282
|
}, {
|
|
244
283
|
sequelize,
|
|
@@ -17,7 +17,7 @@ export interface PlatformUserAlbumTrackAttributes {
|
|
|
17
17
|
|
|
18
18
|
export type PlatformUserAlbumTrackPk = "id";
|
|
19
19
|
export type PlatformUserAlbumTrackId = PlatformUserAlbumTrack[PlatformUserAlbumTrackPk];
|
|
20
|
-
export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "updatedAt"
|
|
20
|
+
export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
21
21
|
export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
|
|
22
22
|
|
|
23
23
|
export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
|
|
@@ -103,7 +103,6 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
|
|
|
103
103
|
stateId: {
|
|
104
104
|
type: DataTypes.SMALLINT,
|
|
105
105
|
allowNull: false,
|
|
106
|
-
defaultValue: 0,
|
|
107
106
|
field: 'state_id'
|
|
108
107
|
}
|
|
109
108
|
}, {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
|
|
4
|
+
export interface PlaybackStatusTypeAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type PlaybackStatusTypePk = "id";
|
|
10
|
+
export type PlaybackStatusTypeId = PlaybackStatusType[PlaybackStatusTypePk];
|
|
11
|
+
export type PlaybackStatusTypeCreationAttributes = PlaybackStatusTypeAttributes;
|
|
12
|
+
|
|
13
|
+
export class PlaybackStatusType extends Model<PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes> implements PlaybackStatusTypeAttributes {
|
|
14
|
+
id!: number;
|
|
15
|
+
description!: string;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatusType {
|
|
19
|
+
return PlaybackStatusType.init({
|
|
20
|
+
id: {
|
|
21
|
+
type: DataTypes.SMALLINT,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
primaryKey: true
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
type: DataTypes.STRING(255),
|
|
27
|
+
allowNull: false
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
sequelize,
|
|
31
|
+
tableName: 'playback_status_type',
|
|
32
|
+
schema: 'eb',
|
|
33
|
+
timestamps: false,
|
|
34
|
+
indexes: [
|
|
35
|
+
{
|
|
36
|
+
name: "playback_status_type_pkey",
|
|
37
|
+
unique: true,
|
|
38
|
+
fields: [
|
|
39
|
+
{ name: "id" },
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|