@earbug/db-models 0.0.6 → 0.0.8
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/AppUser.d.ts +5 -5
- package/dist/AppUser.js +13 -13
- package/dist/AppUserDevice.d.ts +4 -4
- package/dist/AppUserDevice.js +8 -8
- package/dist/AppUserFollowRelation.d.ts +3 -3
- package/dist/AppUserFollowRelation.js +6 -6
- package/dist/AppUserPlatformRelation.d.ts +7 -7
- package/dist/AppUserPlatformRelation.js +18 -18
- package/dist/CanonAlbum.d.ts +29 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonAlbumImageHarvested.d.ts +9 -9
- package/dist/CanonAlbumImageHarvested.js +24 -32
- package/dist/CanonAlbumTrackRelation.d.ts +10 -10
- package/dist/CanonAlbumTrackRelation.js +2 -2
- package/dist/CanonArtist.d.ts +14 -14
- package/dist/CanonArtist.js +6 -6
- package/dist/CanonArtistImageHarvested.d.ts +9 -9
- package/dist/CanonArtistImageHarvested.js +24 -24
- package/dist/CanonGenre.d.ts +3 -3
- package/dist/CanonGenre.js +6 -6
- package/dist/CanonLabel.d.ts +2 -2
- package/dist/CanonLabel.js +6 -6
- package/dist/CanonMember.d.ts +3 -3
- package/dist/CanonMember.js +6 -6
- package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
- package/dist/CanonMemberExternalReferenceRelation.js +5 -5
- package/dist/CanonTrack.d.ts +29 -5
- package/dist/CanonTrack.js +11 -11
- package/dist/ConfigParam.d.ts +2 -2
- package/dist/ConfigParam.js +5 -5
- package/dist/ExternalReference.d.ts +2 -2
- package/dist/ExternalReference.js +5 -5
- package/dist/JukeboxAccessType.d.ts +2 -2
- package/dist/JukeboxAccessType.js +4 -4
- package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
- package/dist/JukeboxCanonGenreRelation.js +6 -6
- package/dist/JukeboxInvite.d.ts +3 -3
- package/dist/JukeboxInvite.js +6 -6
- package/dist/JukeboxQueueEntry.d.ts +10 -10
- package/dist/JukeboxQueueEntry.js +12 -12
- package/dist/JukeboxQueueMode.d.ts +2 -2
- package/dist/JukeboxQueueMode.js +4 -4
- package/dist/JukeboxSession.d.ts +9 -9
- package/dist/JukeboxSession.js +20 -20
- package/dist/JukeboxTerminationCondition.d.ts +2 -2
- package/dist/JukeboxTerminationCondition.js +4 -4
- package/dist/JukeboxType.d.ts +2 -2
- package/dist/JukeboxType.js +4 -4
- package/dist/JukeboxUser.d.ts +7 -7
- package/dist/JukeboxUser.js +20 -20
- package/dist/KnexMigrations.d.ts +3 -3
- package/dist/KnexMigrations.js +6 -6
- package/dist/KnexMigrationsLock.d.ts +3 -3
- package/dist/KnexMigrationsLock.js +5 -5
- package/dist/MetricsDaily.d.ts +3 -3
- package/dist/MetricsDaily.js +4 -4
- package/dist/MetricsEvent.d.ts +5 -1
- package/dist/MetricsEvent.js +6 -0
- package/dist/NewsSite.d.ts +3 -3
- package/dist/NewsSite.js +6 -6
- package/dist/Platform.d.ts +2 -2
- package/dist/Platform.js +7 -7
- package/dist/PlatformAlbum.d.ts +5 -28
- package/dist/PlatformAlbum.js +10 -10
- package/dist/PlatformArtist.d.ts +5 -5
- package/dist/PlatformArtist.js +10 -10
- package/dist/PlatformGenre.d.ts +2 -2
- package/dist/PlatformGenre.js +6 -6
- package/dist/PlatformTrack.d.ts +3 -26
- package/dist/PlatformTrack.js +6 -6
- package/dist/PlatformUserAlbum.d.ts +2 -2
- package/dist/PlatformUserAlbum.js +6 -6
- package/dist/PlatformUserAlbumTrack.d.ts +4 -4
- package/dist/PlatformUserAlbumTrack.js +11 -11
- package/dist/PlatformUserPlaylist.d.ts +5 -5
- package/dist/PlatformUserPlaylist.js +11 -11
- package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
- package/dist/PlatformUserPlaylistTrack.js +17 -17
- package/dist/PlaybackStatus.d.ts +2 -14
- package/dist/PlaybackStatus.js +4 -4
- package/dist/PlaybackStatusType.d.ts +12 -0
- package/dist/State.d.ts +2 -2
- package/dist/State.js +4 -4
- package/dist/UnmatchedAlbum.d.ts +2 -2
- package/dist/UnmatchedAlbum.js +6 -6
- package/dist/UnmatchedArtist.d.ts +2 -2
- package/dist/UnmatchedArtist.js +6 -6
- package/dist/UserContacts.d.ts +3 -3
- package/dist/UserContacts.js +7 -7
- package/dist/init-models.js +9 -9
- package/models/AppUser.ts +18 -18
- package/models/AppUserDevice.ts +12 -12
- package/models/AppUserFollowRelation.ts +9 -9
- package/models/AppUserPlatformRelation.ts +25 -25
- package/models/CanonAlbum.ts +41 -15
- package/models/CanonAlbumImageHarvested.ts +33 -41
- package/models/CanonAlbumTrackRelation.ts +14 -14
- package/models/CanonArtist.ts +20 -20
- package/models/CanonArtistImageHarvested.ts +33 -33
- package/models/CanonGenre.ts +9 -9
- package/models/CanonLabel.ts +8 -8
- package/models/CanonMember.ts +9 -9
- package/models/CanonMemberExternalReferenceRelation.ts +7 -7
- package/models/CanonTrack.ts +42 -16
- package/models/ConfigParam.ts +7 -7
- package/models/ExternalReference.ts +7 -7
- package/models/JukeboxAccessType.ts +6 -6
- package/models/JukeboxCanonGenreRelation.ts +8 -8
- package/models/JukeboxInvite.ts +9 -9
- package/models/JukeboxQueueEntry.ts +23 -23
- package/models/JukeboxQueueMode.ts +6 -6
- package/models/JukeboxSession.ts +29 -29
- package/models/JukeboxTerminationCondition.ts +6 -6
- package/models/JukeboxType.ts +6 -6
- package/models/JukeboxUser.ts +27 -27
- package/models/KnexMigrations.ts +9 -9
- package/models/KnexMigrationsLock.ts +8 -8
- package/models/MetricsDaily.ts +7 -7
- package/models/MetricsEvent.ts +11 -1
- package/models/NewsSite.ts +9 -9
- package/models/Platform.ts +9 -9
- package/models/PlatformAlbum.ts +15 -40
- package/models/PlatformArtist.ts +15 -15
- package/models/PlatformGenre.ts +8 -8
- package/models/PlatformTrack.ts +9 -34
- package/models/PlatformUserAlbum.ts +8 -8
- package/models/PlatformUserAlbumTrack.ts +15 -15
- package/models/PlatformUserPlaylist.ts +16 -16
- package/models/PlatformUserPlaylistTrack.ts +24 -24
- package/models/PlaybackStatus.ts +6 -19
- package/models/PlaybackStatusType.ts +13 -0
- package/models/State.ts +6 -6
- package/models/UnmatchedAlbum.ts +8 -8
- package/models/UnmatchedArtist.ts +8 -8
- package/models/UserContacts.ts +10 -10
- package/models/init-models.ts +9 -9
- package/package.json +1 -1
package/models/AppUserDevice.ts
CHANGED
|
@@ -4,10 +4,10 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
|
|
5
5
|
export interface AppUserDeviceAttributes {
|
|
6
6
|
id: string;
|
|
7
|
+
createdAt: Date;
|
|
7
8
|
appUserId: string;
|
|
8
|
-
|
|
9
|
+
devicePlatformId: number;
|
|
9
10
|
endpointArn: string;
|
|
10
|
-
createdAt: Date;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export type AppUserDevicePk = "id";
|
|
@@ -17,10 +17,10 @@ export type AppUserDeviceCreationAttributes = Optional<AppUserDeviceAttributes,
|
|
|
17
17
|
|
|
18
18
|
export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceCreationAttributes> implements AppUserDeviceAttributes {
|
|
19
19
|
id!: string;
|
|
20
|
+
createdAt!: Date;
|
|
20
21
|
appUserId!: string;
|
|
21
|
-
|
|
22
|
+
devicePlatformId!: number;
|
|
22
23
|
endpointArn!: string;
|
|
23
|
-
createdAt!: Date;
|
|
24
24
|
|
|
25
25
|
// AppUserDevice belongsTo AppUser via appUserId
|
|
26
26
|
appUser!: AppUser;
|
|
@@ -36,6 +36,12 @@ export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceC
|
|
|
36
36
|
defaultValue: DataTypes.UUIDV4,
|
|
37
37
|
primaryKey: true
|
|
38
38
|
},
|
|
39
|
+
createdAt: {
|
|
40
|
+
type: DataTypes.DATE,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
43
|
+
field: 'created_at'
|
|
44
|
+
},
|
|
39
45
|
appUserId: {
|
|
40
46
|
type: DataTypes.UUID,
|
|
41
47
|
allowNull: false,
|
|
@@ -45,22 +51,16 @@ export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceC
|
|
|
45
51
|
},
|
|
46
52
|
field: 'app_user_id'
|
|
47
53
|
},
|
|
48
|
-
|
|
54
|
+
devicePlatformId: {
|
|
49
55
|
type: DataTypes.SMALLINT,
|
|
50
56
|
allowNull: false,
|
|
51
|
-
field: '
|
|
57
|
+
field: 'device_platform_id'
|
|
52
58
|
},
|
|
53
59
|
endpointArn: {
|
|
54
60
|
type: DataTypes.TEXT,
|
|
55
61
|
allowNull: false,
|
|
56
62
|
unique: "unique_app_user_device_endpoint_arn",
|
|
57
63
|
field: 'endpoint_arn'
|
|
58
|
-
},
|
|
59
|
-
createdAt: {
|
|
60
|
-
type: DataTypes.DATE,
|
|
61
|
-
allowNull: false,
|
|
62
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
63
|
-
field: 'created_at'
|
|
64
64
|
}
|
|
65
65
|
}, {
|
|
66
66
|
sequelize,
|
|
@@ -3,28 +3,28 @@ import { DataTypes, Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
|
|
5
5
|
export interface AppUserFollowRelationAttributes {
|
|
6
|
-
id: string;
|
|
7
6
|
appUserId: string;
|
|
8
7
|
followingAppUserId: string;
|
|
9
8
|
stateId: number;
|
|
10
9
|
isBlocked: boolean;
|
|
11
10
|
createdAt: Date;
|
|
12
11
|
updatedAt: Date;
|
|
12
|
+
id: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type AppUserFollowRelationPk = "id";
|
|
16
16
|
export type AppUserFollowRelationId = AppUserFollowRelation[AppUserFollowRelationPk];
|
|
17
|
-
export type AppUserFollowRelationOptionalAttributes = "
|
|
17
|
+
export type AppUserFollowRelationOptionalAttributes = "stateId" | "createdAt" | "updatedAt" | "id";
|
|
18
18
|
export type AppUserFollowRelationCreationAttributes = Optional<AppUserFollowRelationAttributes, AppUserFollowRelationOptionalAttributes>;
|
|
19
19
|
|
|
20
20
|
export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes> implements AppUserFollowRelationAttributes {
|
|
21
|
-
id!: string;
|
|
22
21
|
appUserId!: string;
|
|
23
22
|
followingAppUserId!: string;
|
|
24
23
|
stateId!: number;
|
|
25
24
|
isBlocked!: boolean;
|
|
26
25
|
createdAt!: Date;
|
|
27
26
|
updatedAt!: Date;
|
|
27
|
+
id!: string;
|
|
28
28
|
|
|
29
29
|
// AppUserFollowRelation belongsTo AppUser via appUserId
|
|
30
30
|
appUser!: AppUser;
|
|
@@ -39,12 +39,6 @@ export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes
|
|
|
39
39
|
|
|
40
40
|
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserFollowRelation {
|
|
41
41
|
return AppUserFollowRelation.init({
|
|
42
|
-
id: {
|
|
43
|
-
type: DataTypes.UUID,
|
|
44
|
-
allowNull: false,
|
|
45
|
-
defaultValue: DataTypes.UUIDV4,
|
|
46
|
-
primaryKey: true
|
|
47
|
-
},
|
|
48
42
|
appUserId: {
|
|
49
43
|
type: DataTypes.UUID,
|
|
50
44
|
allowNull: false,
|
|
@@ -88,6 +82,12 @@ export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes
|
|
|
88
82
|
allowNull: false,
|
|
89
83
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
90
84
|
field: 'updated_at'
|
|
85
|
+
},
|
|
86
|
+
id: {
|
|
87
|
+
type: DataTypes.UUID,
|
|
88
|
+
allowNull: false,
|
|
89
|
+
defaultValue: DataTypes.UUIDV4,
|
|
90
|
+
primaryKey: true
|
|
91
91
|
}
|
|
92
92
|
}, {
|
|
93
93
|
sequelize,
|
|
@@ -4,35 +4,35 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { Platform, PlatformId } from './Platform';
|
|
5
5
|
|
|
6
6
|
export interface AppUserPlatformRelationAttributes {
|
|
7
|
-
id: string;
|
|
8
7
|
appUserId: string;
|
|
9
8
|
platformId: number;
|
|
10
9
|
externalUserId: string;
|
|
11
|
-
createDate: Date;
|
|
12
|
-
updateDate: Date;
|
|
13
10
|
accessToken: string;
|
|
14
11
|
refreshToken?: string;
|
|
15
12
|
expirationDate: Date;
|
|
16
13
|
countryCode: string;
|
|
14
|
+
id: string;
|
|
15
|
+
createDate: Date;
|
|
16
|
+
updateDate: Date;
|
|
17
17
|
stateId: number;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type AppUserPlatformRelationPk = "id";
|
|
21
21
|
export type AppUserPlatformRelationId = AppUserPlatformRelation[AppUserPlatformRelationPk];
|
|
22
|
-
export type AppUserPlatformRelationOptionalAttributes = "
|
|
22
|
+
export type AppUserPlatformRelationOptionalAttributes = "refreshToken" | "id" | "createDate" | "updateDate" | "stateId";
|
|
23
23
|
export type AppUserPlatformRelationCreationAttributes = Optional<AppUserPlatformRelationAttributes, AppUserPlatformRelationOptionalAttributes>;
|
|
24
24
|
|
|
25
25
|
export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes> implements AppUserPlatformRelationAttributes {
|
|
26
|
-
id!: string;
|
|
27
26
|
appUserId!: string;
|
|
28
27
|
platformId!: number;
|
|
29
28
|
externalUserId!: string;
|
|
30
|
-
createDate!: Date;
|
|
31
|
-
updateDate!: Date;
|
|
32
29
|
accessToken!: string;
|
|
33
30
|
refreshToken?: string;
|
|
34
31
|
expirationDate!: Date;
|
|
35
32
|
countryCode!: string;
|
|
33
|
+
id!: string;
|
|
34
|
+
createDate!: Date;
|
|
35
|
+
updateDate!: Date;
|
|
36
36
|
stateId!: number;
|
|
37
37
|
|
|
38
38
|
// AppUserPlatformRelation belongsTo AppUser via appUserId
|
|
@@ -48,12 +48,6 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
|
|
|
48
48
|
|
|
49
49
|
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserPlatformRelation {
|
|
50
50
|
return AppUserPlatformRelation.init({
|
|
51
|
-
id: {
|
|
52
|
-
type: DataTypes.UUID,
|
|
53
|
-
allowNull: false,
|
|
54
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
55
|
-
primaryKey: true
|
|
56
|
-
},
|
|
57
51
|
appUserId: {
|
|
58
52
|
type: DataTypes.UUID,
|
|
59
53
|
allowNull: false,
|
|
@@ -78,18 +72,6 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
|
|
|
78
72
|
allowNull: false,
|
|
79
73
|
field: 'external_user_id'
|
|
80
74
|
},
|
|
81
|
-
createDate: {
|
|
82
|
-
type: DataTypes.DATE,
|
|
83
|
-
allowNull: false,
|
|
84
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
85
|
-
field: 'create_date'
|
|
86
|
-
},
|
|
87
|
-
updateDate: {
|
|
88
|
-
type: DataTypes.DATE,
|
|
89
|
-
allowNull: false,
|
|
90
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
91
|
-
field: 'update_date'
|
|
92
|
-
},
|
|
93
75
|
accessToken: {
|
|
94
76
|
type: DataTypes.STRING,
|
|
95
77
|
allowNull: false,
|
|
@@ -110,6 +92,24 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
|
|
|
110
92
|
allowNull: false,
|
|
111
93
|
field: 'country_code'
|
|
112
94
|
},
|
|
95
|
+
id: {
|
|
96
|
+
type: DataTypes.UUID,
|
|
97
|
+
allowNull: false,
|
|
98
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
99
|
+
primaryKey: true
|
|
100
|
+
},
|
|
101
|
+
createDate: {
|
|
102
|
+
type: DataTypes.DATE,
|
|
103
|
+
allowNull: false,
|
|
104
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
105
|
+
field: 'create_date'
|
|
106
|
+
},
|
|
107
|
+
updateDate: {
|
|
108
|
+
type: DataTypes.DATE,
|
|
109
|
+
allowNull: false,
|
|
110
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
111
|
+
field: 'update_date'
|
|
112
|
+
},
|
|
113
113
|
stateId: {
|
|
114
114
|
type: DataTypes.SMALLINT,
|
|
115
115
|
allowNull: false,
|
package/models/CanonAlbum.ts
CHANGED
|
@@ -2,41 +2,43 @@ 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';
|
|
5
6
|
import type { CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId } from './CanonToPlatformAlbumRelation';
|
|
7
|
+
import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
6
8
|
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
7
9
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
8
10
|
|
|
9
11
|
export interface CanonAlbumAttributes {
|
|
10
|
-
id: string;
|
|
11
12
|
name: string;
|
|
12
13
|
asciiName: string;
|
|
13
14
|
releaseDate?: string;
|
|
14
15
|
noOfDisc?: number;
|
|
16
|
+
description?: string;
|
|
17
|
+
id: string;
|
|
15
18
|
createDate: Date;
|
|
16
19
|
updateDate: Date;
|
|
17
20
|
hasPhoto?: boolean;
|
|
18
21
|
hasThumbnailPhoto?: boolean;
|
|
19
|
-
description?: string;
|
|
20
22
|
images?: object;
|
|
21
23
|
lastImageHarvestAttempt?: Date;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export type CanonAlbumPk = "id";
|
|
25
27
|
export type CanonAlbumId = CanonAlbum[CanonAlbumPk];
|
|
26
|
-
export type CanonAlbumOptionalAttributes = "
|
|
28
|
+
export type CanonAlbumOptionalAttributes = "releaseDate" | "noOfDisc" | "description" | "id" | "createDate" | "updateDate" | "hasPhoto" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
27
29
|
export type CanonAlbumCreationAttributes = Optional<CanonAlbumAttributes, CanonAlbumOptionalAttributes>;
|
|
28
30
|
|
|
29
31
|
export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAttributes> implements CanonAlbumAttributes {
|
|
30
|
-
id!: string;
|
|
31
32
|
name!: string;
|
|
32
33
|
asciiName!: string;
|
|
33
34
|
releaseDate?: string;
|
|
34
35
|
noOfDisc?: number;
|
|
36
|
+
description?: string;
|
|
37
|
+
id!: string;
|
|
35
38
|
createDate!: Date;
|
|
36
39
|
updateDate!: Date;
|
|
37
40
|
hasPhoto?: boolean;
|
|
38
41
|
hasThumbnailPhoto?: boolean;
|
|
39
|
-
description?: string;
|
|
40
42
|
images?: object;
|
|
41
43
|
lastImageHarvestAttempt?: Date;
|
|
42
44
|
|
|
@@ -64,6 +66,18 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
64
66
|
hasCanonAlbumImageHarvested!: Sequelize.HasManyHasAssociationMixin<CanonAlbumImageHarvested, CanonAlbumImageHarvestedId>;
|
|
65
67
|
hasCanonAlbumImageHarvesteds!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumImageHarvested, CanonAlbumImageHarvestedId>;
|
|
66
68
|
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;
|
|
67
81
|
// CanonAlbum hasMany CanonToPlatformAlbumRelation via canonAlbumId
|
|
68
82
|
canonToPlatformAlbumRelations!: CanonToPlatformAlbumRelation[];
|
|
69
83
|
getCanonToPlatformAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformAlbumRelation>;
|
|
@@ -76,6 +90,18 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
76
90
|
hasCanonToPlatformAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
77
91
|
hasCanonToPlatformAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
78
92
|
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;
|
|
79
105
|
// CanonAlbum belongsToMany ExternalReference via canonAlbumId and externalReferenceId
|
|
80
106
|
externalReferenceIdExternalReferences!: ExternalReference[];
|
|
81
107
|
getExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
|
|
@@ -103,12 +129,6 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
103
129
|
|
|
104
130
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonAlbum {
|
|
105
131
|
return CanonAlbum.init({
|
|
106
|
-
id: {
|
|
107
|
-
type: DataTypes.UUID,
|
|
108
|
-
allowNull: false,
|
|
109
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
110
|
-
primaryKey: true
|
|
111
|
-
},
|
|
112
132
|
name: {
|
|
113
133
|
type: DataTypes.TEXT,
|
|
114
134
|
allowNull: false
|
|
@@ -128,6 +148,16 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
128
148
|
allowNull: true,
|
|
129
149
|
field: 'no_of_disc'
|
|
130
150
|
},
|
|
151
|
+
description: {
|
|
152
|
+
type: DataTypes.TEXT,
|
|
153
|
+
allowNull: true
|
|
154
|
+
},
|
|
155
|
+
id: {
|
|
156
|
+
type: DataTypes.UUID,
|
|
157
|
+
allowNull: false,
|
|
158
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
159
|
+
primaryKey: true
|
|
160
|
+
},
|
|
131
161
|
createDate: {
|
|
132
162
|
type: DataTypes.DATE,
|
|
133
163
|
allowNull: false,
|
|
@@ -152,10 +182,6 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
|
|
|
152
182
|
defaultValue: false,
|
|
153
183
|
field: 'has_thumbnail_photo'
|
|
154
184
|
},
|
|
155
|
-
description: {
|
|
156
|
-
type: DataTypes.TEXT,
|
|
157
|
-
allowNull: true
|
|
158
|
-
},
|
|
159
185
|
images: {
|
|
160
186
|
type: DataTypes.JSONB,
|
|
161
187
|
allowNull: true
|
|
@@ -3,28 +3,28 @@ import { DataTypes, Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
|
|
4
4
|
|
|
5
5
|
export interface CanonAlbumImageHarvestedAttributes {
|
|
6
|
-
id: string;
|
|
7
|
-
canonAlbumId: string;
|
|
8
|
-
priority?: number;
|
|
9
|
-
url?: string;
|
|
10
6
|
dateHarvested: Date;
|
|
11
7
|
storageKey: string;
|
|
12
8
|
harvestMethod?: string;
|
|
9
|
+
priority?: number;
|
|
10
|
+
id: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
canonAlbumId: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type CanonAlbumImageHarvestedPk = "id";
|
|
16
16
|
export type CanonAlbumImageHarvestedId = CanonAlbumImageHarvested[CanonAlbumImageHarvestedPk];
|
|
17
|
-
export type CanonAlbumImageHarvestedOptionalAttributes = "
|
|
17
|
+
export type CanonAlbumImageHarvestedOptionalAttributes = "harvestMethod" | "priority" | "id" | "url";
|
|
18
18
|
export type CanonAlbumImageHarvestedCreationAttributes = Optional<CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedOptionalAttributes>;
|
|
19
19
|
|
|
20
20
|
export class CanonAlbumImageHarvested extends Model<CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedCreationAttributes> implements CanonAlbumImageHarvestedAttributes {
|
|
21
|
-
id!: string;
|
|
22
|
-
canonAlbumId!: string;
|
|
23
|
-
priority?: number;
|
|
24
|
-
url?: string;
|
|
25
21
|
dateHarvested!: Date;
|
|
26
22
|
storageKey!: string;
|
|
27
23
|
harvestMethod?: string;
|
|
24
|
+
priority?: number;
|
|
25
|
+
id!: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
canonAlbumId!: string;
|
|
28
28
|
|
|
29
29
|
// CanonAlbumImageHarvested belongsTo CanonAlbum via canonAlbumId
|
|
30
30
|
canonAlbum!: CanonAlbum;
|
|
@@ -34,31 +34,6 @@ export class CanonAlbumImageHarvested extends Model<CanonAlbumImageHarvestedAttr
|
|
|
34
34
|
|
|
35
35
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonAlbumImageHarvested {
|
|
36
36
|
return CanonAlbumImageHarvested.init({
|
|
37
|
-
id: {
|
|
38
|
-
type: DataTypes.UUID,
|
|
39
|
-
allowNull: false,
|
|
40
|
-
defaultValue: DataTypes.UUIDV4,
|
|
41
|
-
primaryKey: true
|
|
42
|
-
},
|
|
43
|
-
canonAlbumId: {
|
|
44
|
-
type: DataTypes.UUID,
|
|
45
|
-
allowNull: false,
|
|
46
|
-
references: {
|
|
47
|
-
model: 'canon_album',
|
|
48
|
-
key: 'id'
|
|
49
|
-
},
|
|
50
|
-
field: 'canon_album_id'
|
|
51
|
-
},
|
|
52
|
-
priority: {
|
|
53
|
-
type: DataTypes.DECIMAL,
|
|
54
|
-
allowNull: true,
|
|
55
|
-
defaultValue: 0
|
|
56
|
-
},
|
|
57
|
-
url: {
|
|
58
|
-
type: DataTypes.TEXT,
|
|
59
|
-
allowNull: true,
|
|
60
|
-
unique: "canon_album_image_harvested_url_unique"
|
|
61
|
-
},
|
|
62
37
|
dateHarvested: {
|
|
63
38
|
type: DataTypes.DATE,
|
|
64
39
|
allowNull: false,
|
|
@@ -73,6 +48,30 @@ export class CanonAlbumImageHarvested extends Model<CanonAlbumImageHarvestedAttr
|
|
|
73
48
|
type: DataTypes.STRING(255),
|
|
74
49
|
allowNull: true,
|
|
75
50
|
field: 'harvest_method'
|
|
51
|
+
},
|
|
52
|
+
priority: {
|
|
53
|
+
type: DataTypes.DECIMAL,
|
|
54
|
+
allowNull: true,
|
|
55
|
+
defaultValue: 0
|
|
56
|
+
},
|
|
57
|
+
id: {
|
|
58
|
+
type: DataTypes.UUID,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
defaultValue: DataTypes.UUIDV4,
|
|
61
|
+
primaryKey: true
|
|
62
|
+
},
|
|
63
|
+
url: {
|
|
64
|
+
type: DataTypes.TEXT,
|
|
65
|
+
allowNull: true
|
|
66
|
+
},
|
|
67
|
+
canonAlbumId: {
|
|
68
|
+
type: DataTypes.UUID,
|
|
69
|
+
allowNull: false,
|
|
70
|
+
references: {
|
|
71
|
+
model: 'canon_album',
|
|
72
|
+
key: 'id'
|
|
73
|
+
},
|
|
74
|
+
field: 'canon_album_id'
|
|
76
75
|
}
|
|
77
76
|
}, {
|
|
78
77
|
sequelize,
|
|
@@ -93,13 +92,6 @@ export class CanonAlbumImageHarvested extends Model<CanonAlbumImageHarvestedAttr
|
|
|
93
92
|
{ name: "id" },
|
|
94
93
|
]
|
|
95
94
|
},
|
|
96
|
-
{
|
|
97
|
-
name: "canon_album_image_harvested_url_unique",
|
|
98
|
-
unique: true,
|
|
99
|
-
fields: [
|
|
100
|
-
{ name: "url" },
|
|
101
|
-
]
|
|
102
|
-
},
|
|
103
95
|
]
|
|
104
96
|
});
|
|
105
97
|
}
|
|
@@ -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 { CanonAlbum, CanonAlbumId } from './CanonAlbum';
|
|
4
|
+
import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
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 CanonAlbum via canonAlbumId
|
|
25
|
+
canonAlbum!: CanonAlbum;
|
|
26
|
+
getCanonAlbum!: Sequelize.BelongsToGetAssociationMixin<CanonAlbum>;
|
|
27
|
+
setCanonAlbum!: Sequelize.BelongsToSetAssociationMixin<CanonAlbum, CanonAlbumId>;
|
|
28
|
+
createCanonAlbum!: Sequelize.BelongsToCreateAssociationMixin<CanonAlbum>;
|
|
29
|
+
// CanonAlbumTrackRelation belongsTo CanonTrack via canonTrackId
|
|
30
|
+
canonTrack!: CanonTrack;
|
|
31
|
+
getCanonTrack!: Sequelize.BelongsToGetAssociationMixin<CanonTrack>;
|
|
32
|
+
setCanonTrack!: Sequelize.BelongsToSetAssociationMixin<CanonTrack, CanonTrackId>;
|
|
33
|
+
createCanonTrack!: Sequelize.BelongsToCreateAssociationMixin<CanonTrack>;
|
|
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: 'canon_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: 'canon_track',
|
|
53
53
|
key: 'id'
|
|
54
54
|
},
|
|
55
55
|
field: 'canon_track_id'
|
package/models/CanonArtist.ts
CHANGED
|
@@ -9,10 +9,10 @@ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
|
9
9
|
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
10
10
|
|
|
11
11
|
export interface CanonArtistAttributes {
|
|
12
|
-
id: string;
|
|
13
12
|
name: string;
|
|
14
13
|
asciiName: string;
|
|
15
14
|
description?: string;
|
|
15
|
+
id: string;
|
|
16
16
|
hasPhoto: boolean;
|
|
17
17
|
createDate: Date;
|
|
18
18
|
updateDate: Date;
|
|
@@ -23,14 +23,14 @@ export interface CanonArtistAttributes {
|
|
|
23
23
|
|
|
24
24
|
export type CanonArtistPk = "id";
|
|
25
25
|
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
26
|
-
export type CanonArtistOptionalAttributes = "
|
|
26
|
+
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
27
27
|
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
28
28
|
|
|
29
29
|
export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
30
|
-
id!: string;
|
|
31
30
|
name!: string;
|
|
32
31
|
asciiName!: string;
|
|
33
32
|
description?: string;
|
|
33
|
+
id!: string;
|
|
34
34
|
hasPhoto!: boolean;
|
|
35
35
|
createDate!: Date;
|
|
36
36
|
updateDate!: Date;
|
|
@@ -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
|
+
canonTrackIdCanonTrackCanonArtistTrackRelations!: CanonTrack[];
|
|
91
|
+
getCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonTrack>;
|
|
92
|
+
setCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
93
|
+
addCanonTrackIdCanonTrackCanonArtistTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonTrack, CanonTrackId>;
|
|
94
|
+
addCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
95
|
+
createCanonTrackIdCanonTrackCanonArtistTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonTrack>;
|
|
96
|
+
removeCanonTrackIdCanonTrackCanonArtistTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonTrack, CanonTrackId>;
|
|
97
|
+
removeCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
98
|
+
hasCanonTrackIdCanonTrackCanonArtistTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
|
|
99
|
+
hasCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
100
|
+
countCanonTrackIdCanonTrackCanonArtistTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
101
101
|
// CanonArtist belongsToMany PlatformAlbum via canonArtistId and canonAlbumId
|
|
102
102
|
canonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: PlatformAlbum[];
|
|
103
103
|
getCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
@@ -125,12 +125,6 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
125
125
|
|
|
126
126
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtist {
|
|
127
127
|
return CanonArtist.init({
|
|
128
|
-
id: {
|
|
129
|
-
type: DataTypes.UUID,
|
|
130
|
-
allowNull: false,
|
|
131
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
132
|
-
primaryKey: true
|
|
133
|
-
},
|
|
134
128
|
name: {
|
|
135
129
|
type: DataTypes.TEXT,
|
|
136
130
|
allowNull: false
|
|
@@ -144,6 +138,12 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
144
138
|
type: DataTypes.TEXT,
|
|
145
139
|
allowNull: true
|
|
146
140
|
},
|
|
141
|
+
id: {
|
|
142
|
+
type: DataTypes.UUID,
|
|
143
|
+
allowNull: false,
|
|
144
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
145
|
+
primaryKey: true
|
|
146
|
+
},
|
|
147
147
|
hasPhoto: {
|
|
148
148
|
type: DataTypes.BOOLEAN,
|
|
149
149
|
allowNull: false,
|