@earbug/db-models 0.0.1
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/.nvmrc +1 -0
- package/dist/AppUser.d.ts +161 -0
- package/dist/AppUser.js +121 -0
- package/dist/AppUserDevice.d.ts +26 -0
- package/dist/AppUserDevice.js +88 -0
- package/dist/AppUserFollowRelation.d.ts +34 -0
- package/dist/AppUserFollowRelation.js +113 -0
- package/dist/AppUserPlatformRelation.d.ts +43 -0
- package/dist/AppUserPlatformRelation.js +132 -0
- package/dist/CanonAlbum.d.ts +119 -0
- package/dist/CanonAlbum.js +117 -0
- package/dist/CanonAlbumExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonAlbumExternalReferenceRelation.js +86 -0
- package/dist/CanonAlbumGenreRelation.d.ts +29 -0
- package/dist/CanonAlbumGenreRelation.js +82 -0
- package/dist/CanonAlbumImageHarvested.d.ts +30 -0
- package/dist/CanonAlbumImageHarvested.js +78 -0
- package/dist/CanonAlbumLabelRelation.d.ts +29 -0
- package/dist/CanonAlbumLabelRelation.js +82 -0
- package/dist/CanonAlbumTrackRelation.d.ts +29 -0
- package/dist/CanonAlbumTrackRelation.js +82 -0
- package/dist/CanonArtist.d.ts +91 -0
- package/dist/CanonArtist.js +114 -0
- package/dist/CanonArtistAlbumRelation.d.ts +29 -0
- package/dist/CanonArtistAlbumRelation.js +82 -0
- package/dist/CanonArtistExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonArtistExternalReferenceRelation.js +86 -0
- package/dist/CanonArtistGenreRelation.d.ts +29 -0
- package/dist/CanonArtistGenreRelation.js +82 -0
- package/dist/CanonArtistImageHarvested.d.ts +30 -0
- package/dist/CanonArtistImageHarvested.js +70 -0
- package/dist/CanonArtistMemberRelation.d.ts +29 -0
- package/dist/CanonArtistMemberRelation.js +82 -0
- package/dist/CanonArtistTrackRelation.d.ts +29 -0
- package/dist/CanonArtistTrackRelation.js +82 -0
- package/dist/CanonGenre.d.ts +133 -0
- package/dist/CanonGenre.js +93 -0
- package/dist/CanonGenreExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonGenreExternalReferenceRelation.js +86 -0
- package/dist/CanonLabel.d.ts +69 -0
- package/dist/CanonLabel.js +83 -0
- package/dist/CanonLabelExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonLabelExternalReferenceRelation.js +86 -0
- package/dist/CanonMember.d.ts +71 -0
- package/dist/CanonMember.js +82 -0
- package/dist/CanonMemberExternalReferenceRelation.d.ts +33 -0
- package/dist/CanonMemberExternalReferenceRelation.js +91 -0
- package/dist/CanonToPlatformAlbumRelation.d.ts +29 -0
- package/dist/CanonToPlatformAlbumRelation.js +82 -0
- package/dist/CanonToPlatformArtistRelation.d.ts +29 -0
- package/dist/CanonToPlatformArtistRelation.js +82 -0
- package/dist/CanonToPlatformGenreRelation.d.ts +29 -0
- package/dist/CanonToPlatformGenreRelation.js +82 -0
- package/dist/CanonToPlatformTrackRelation.d.ts +29 -0
- package/dist/CanonToPlatformTrackRelation.js +82 -0
- package/dist/CanonTrack.d.ts +89 -0
- package/dist/CanonTrack.js +99 -0
- package/dist/ConfigParam.d.ts +19 -0
- package/dist/ConfigParam.js +70 -0
- package/dist/ExternalReference.d.ts +139 -0
- package/dist/ExternalReference.js +79 -0
- package/dist/JukeboxAccessType.d.ts +26 -0
- package/dist/JukeboxAccessType.js +36 -0
- package/dist/JukeboxCanonGenreRelation.d.ts +33 -0
- package/dist/JukeboxCanonGenreRelation.js +101 -0
- package/dist/JukeboxInvite.d.ts +39 -0
- package/dist/JukeboxInvite.js +98 -0
- package/dist/JukeboxQueueEntry.d.ts +74 -0
- package/dist/JukeboxQueueEntry.js +142 -0
- package/dist/JukeboxQueueMode.d.ts +26 -0
- package/dist/JukeboxQueueMode.js +36 -0
- package/dist/JukeboxSession.d.ts +108 -0
- package/dist/JukeboxSession.js +133 -0
- package/dist/JukeboxStatus.d.ts +26 -0
- package/dist/JukeboxStatus.js +34 -0
- package/dist/JukeboxTerminationCondition.d.ts +26 -0
- package/dist/JukeboxTerminationCondition.js +36 -0
- package/dist/JukeboxType.d.ts +26 -0
- package/dist/JukeboxType.js +36 -0
- package/dist/JukeboxUser.d.ts +56 -0
- package/dist/JukeboxUser.js +135 -0
- package/dist/JukeboxUserType.d.ts +26 -0
- package/dist/JukeboxUserType.js +34 -0
- package/dist/KnexMigrations.d.ts +19 -0
- package/dist/KnexMigrations.js +44 -0
- package/dist/KnexMigrationsLock.d.ts +15 -0
- package/dist/KnexMigrationsLock.js +36 -0
- package/dist/MetricsDaily.d.ts +19 -0
- package/dist/MetricsDaily.js +87 -0
- package/dist/MetricsEvent.d.ts +23 -0
- package/dist/MetricsEvent.js +117 -0
- package/dist/NewsSite.d.ts +21 -0
- package/dist/NewsSite.js +57 -0
- package/dist/PauseStatusType.d.ts +26 -0
- package/dist/PauseStatusType.js +34 -0
- package/dist/Platform.d.ts +127 -0
- package/dist/Platform.js +80 -0
- package/dist/PlatformAlbum.d.ts +232 -0
- package/dist/PlatformAlbum.js +123 -0
- package/dist/PlatformAlbumGenreRelation.d.ts +29 -0
- package/dist/PlatformAlbumGenreRelation.js +82 -0
- package/dist/PlatformAlbumTrackRelation.d.ts +29 -0
- package/dist/PlatformAlbumTrackRelation.js +82 -0
- package/dist/PlatformArtist.d.ts +225 -0
- package/dist/PlatformArtist.js +109 -0
- package/dist/PlatformArtistAlbumRelation.d.ts +29 -0
- package/dist/PlatformArtistAlbumRelation.js +82 -0
- package/dist/PlatformArtistGenreRelation.d.ts +29 -0
- package/dist/PlatformArtistGenreRelation.js +82 -0
- package/dist/PlatformArtistTrackRelation.d.ts +29 -0
- package/dist/PlatformArtistTrackRelation.js +82 -0
- package/dist/PlatformGenre.d.ts +122 -0
- package/dist/PlatformGenre.js +90 -0
- package/dist/PlatformTrack.d.ts +183 -0
- package/dist/PlatformTrack.js +129 -0
- package/dist/PlatformTrackGenreRelation.d.ts +29 -0
- package/dist/PlatformTrackGenreRelation.js +82 -0
- package/dist/PlatformUserAlbum.d.ts +54 -0
- package/dist/PlatformUserAlbum.js +121 -0
- package/dist/PlatformUserAlbumTrack.d.ts +42 -0
- package/dist/PlatformUserAlbumTrack.js +121 -0
- package/dist/PlatformUserPlaylist.d.ts +62 -0
- package/dist/PlatformUserPlaylist.js +135 -0
- package/dist/PlatformUserPlaylistTrack.d.ts +48 -0
- package/dist/PlatformUserPlaylistTrack.js +132 -0
- package/dist/PlaybackStatus.d.ts +26 -0
- package/dist/PlaybackStatus.js +36 -0
- package/dist/State.d.ts +50 -0
- package/dist/State.js +36 -0
- package/dist/TrackDeletionReason.d.ts +26 -0
- package/dist/TrackDeletionReason.js +34 -0
- package/dist/UnmatchedAlbum.d.ts +22 -0
- package/dist/UnmatchedAlbum.js +70 -0
- package/dist/UnmatchedArtist.d.ts +26 -0
- package/dist/UnmatchedArtist.js +81 -0
- package/dist/UserContacts.d.ts +46 -0
- package/dist/UserContacts.js +105 -0
- package/dist/init-models.d.ts +209 -0
- package/dist/init-models.js +507 -0
- package/model_options.json +3 -0
- package/models/AppUser.ts +267 -0
- package/models/AppUserDevice.ts +88 -0
- package/models/AppUserFollowRelation.ts +122 -0
- package/models/AppUserPlatformRelation.ts +150 -0
- package/models/CanonAlbum.ts +216 -0
- package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
- package/models/CanonAlbumGenreRelation.ts +86 -0
- package/models/CanonAlbumImageHarvested.ts +106 -0
- package/models/CanonAlbumLabelRelation.ts +86 -0
- package/models/CanonAlbumTrackRelation.ts +86 -0
- package/models/CanonArtist.ts +183 -0
- package/models/CanonArtistAlbumRelation.ts +86 -0
- package/models/CanonArtistExternalReferenceRelation.ts +92 -0
- package/models/CanonArtistGenreRelation.ts +86 -0
- package/models/CanonArtistImageHarvested.ts +98 -0
- package/models/CanonArtistMemberRelation.ts +86 -0
- package/models/CanonArtistTrackRelation.ts +86 -0
- package/models/CanonGenre.ts +208 -0
- package/models/CanonGenreExternalReferenceRelation.ts +92 -0
- package/models/CanonLabel.ts +129 -0
- package/models/CanonLabelExternalReferenceRelation.ts +92 -0
- package/models/CanonMember.ts +130 -0
- package/models/CanonMemberExternalReferenceRelation.ts +99 -0
- package/models/CanonToPlatformAlbumRelation.ts +86 -0
- package/models/CanonToPlatformArtistRelation.ts +86 -0
- package/models/CanonToPlatformGenreRelation.ts +86 -0
- package/models/CanonToPlatformTrackRelation.ts +86 -0
- package/models/CanonTrack.ts +167 -0
- package/models/ConfigParam.ts +62 -0
- package/models/ExternalReference.ts +201 -0
- package/models/JukeboxAccessType.ts +60 -0
- package/models/JukeboxCanonGenreRelation.ts +109 -0
- package/models/JukeboxInvite.ts +113 -0
- package/models/JukeboxQueueEntry.ts +195 -0
- package/models/JukeboxQueueMode.ts +60 -0
- package/models/JukeboxSession.ts +223 -0
- package/models/JukeboxStatus.ts +58 -0
- package/models/JukeboxTerminationCondition.ts +60 -0
- package/models/JukeboxType.ts +60 -0
- package/models/JukeboxUser.ts +169 -0
- package/models/JukeboxUserType.ts +58 -0
- package/models/KnexMigrations.ts +60 -0
- package/models/KnexMigrationsLock.ts +48 -0
- package/models/MetricsDaily.ts +79 -0
- package/models/MetricsEvent.ts +114 -0
- package/models/NewsSite.ts +75 -0
- package/models/PauseStatusType.ts +58 -0
- package/models/Platform.ts +189 -0
- package/models/PlatformAlbum.ts +345 -0
- package/models/PlatformAlbumGenreRelation.ts +86 -0
- package/models/PlatformAlbumTrackRelation.ts +86 -0
- package/models/PlatformArtist.ts +324 -0
- package/models/PlatformArtistAlbumRelation.ts +86 -0
- package/models/PlatformArtistGenreRelation.ts +86 -0
- package/models/PlatformArtistTrackRelation.ts +86 -0
- package/models/PlatformGenre.ts +194 -0
- package/models/PlatformTrack.ts +298 -0
- package/models/PlatformTrackGenreRelation.ts +86 -0
- package/models/PlatformUserAlbum.ts +152 -0
- package/models/PlatformUserAlbumTrack.ts +139 -0
- package/models/PlatformUserPlaylist.ts +174 -0
- package/models/PlatformUserPlaylistTrack.ts +156 -0
- package/models/PlaybackStatus.ts +60 -0
- package/models/State.ts +86 -0
- package/models/TrackDeletionReason.ts +58 -0
- package/models/UnmatchedAlbum.ts +66 -0
- package/models/UnmatchedArtist.ts +81 -0
- package/models/UserContacts.ts +149 -0
- package/models/init-models.ts +716 -0
- package/package.json +19 -0
- package/tsconfig.json +52 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtistAlbumRelation, CanonArtistAlbumRelationId } from './CanonArtistAlbumRelation';
|
|
4
|
+
import type { CanonArtistImageHarvested, CanonArtistImageHarvestedId } from './CanonArtistImageHarvested';
|
|
5
|
+
import type { CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId } from './CanonToPlatformArtistRelation';
|
|
6
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
7
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
8
|
+
|
|
9
|
+
export interface CanonArtistAttributes {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
asciiName: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
hasPhoto: boolean;
|
|
15
|
+
createDate: Date;
|
|
16
|
+
updateDate: Date;
|
|
17
|
+
hasThumbnailPhoto?: boolean;
|
|
18
|
+
images?: object;
|
|
19
|
+
lastImageHarvestAttempt?: Date;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type CanonArtistPk = "id";
|
|
23
|
+
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
24
|
+
export type CanonArtistOptionalAttributes = "id" | "description" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
25
|
+
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
26
|
+
|
|
27
|
+
export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
28
|
+
id!: string;
|
|
29
|
+
name!: string;
|
|
30
|
+
asciiName!: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
hasPhoto!: boolean;
|
|
33
|
+
createDate!: Date;
|
|
34
|
+
updateDate!: Date;
|
|
35
|
+
hasThumbnailPhoto?: boolean;
|
|
36
|
+
images?: object;
|
|
37
|
+
lastImageHarvestAttempt?: Date;
|
|
38
|
+
|
|
39
|
+
// CanonArtist hasMany CanonArtistAlbumRelation via canonArtistId
|
|
40
|
+
canonArtistAlbumRelations!: CanonArtistAlbumRelation[];
|
|
41
|
+
getCanonArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistAlbumRelation>;
|
|
42
|
+
setCanonArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
43
|
+
addCanonArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
44
|
+
addCanonArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
45
|
+
createCanonArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistAlbumRelation>;
|
|
46
|
+
removeCanonArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
47
|
+
removeCanonArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
48
|
+
hasCanonArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
49
|
+
hasCanonArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
|
50
|
+
countCanonArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
51
|
+
// CanonArtist hasMany CanonArtistImageHarvested via canonArtistId
|
|
52
|
+
canonArtistImageHarvesteds!: CanonArtistImageHarvested[];
|
|
53
|
+
getCanonArtistImageHarvesteds!: Sequelize.HasManyGetAssociationsMixin<CanonArtistImageHarvested>;
|
|
54
|
+
setCanonArtistImageHarvesteds!: Sequelize.HasManySetAssociationsMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
55
|
+
addCanonArtistImageHarvested!: Sequelize.HasManyAddAssociationMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
56
|
+
addCanonArtistImageHarvesteds!: Sequelize.HasManyAddAssociationsMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
57
|
+
createCanonArtistImageHarvested!: Sequelize.HasManyCreateAssociationMixin<CanonArtistImageHarvested>;
|
|
58
|
+
removeCanonArtistImageHarvested!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
59
|
+
removeCanonArtistImageHarvesteds!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
60
|
+
hasCanonArtistImageHarvested!: Sequelize.HasManyHasAssociationMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
61
|
+
hasCanonArtistImageHarvesteds!: Sequelize.HasManyHasAssociationsMixin<CanonArtistImageHarvested, CanonArtistImageHarvestedId>;
|
|
62
|
+
countCanonArtistImageHarvesteds!: Sequelize.HasManyCountAssociationsMixin;
|
|
63
|
+
// CanonArtist hasMany CanonToPlatformArtistRelation via canonArtistId
|
|
64
|
+
canonToPlatformArtistRelations!: CanonToPlatformArtistRelation[];
|
|
65
|
+
getCanonToPlatformArtistRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformArtistRelation>;
|
|
66
|
+
setCanonToPlatformArtistRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
67
|
+
addCanonToPlatformArtistRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
68
|
+
addCanonToPlatformArtistRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
69
|
+
createCanonToPlatformArtistRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformArtistRelation>;
|
|
70
|
+
removeCanonToPlatformArtistRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
71
|
+
removeCanonToPlatformArtistRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
72
|
+
hasCanonToPlatformArtistRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
73
|
+
hasCanonToPlatformArtistRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
|
|
74
|
+
countCanonToPlatformArtistRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
75
|
+
// CanonArtist belongsToMany PlatformAlbum via canonArtistId and canonAlbumId
|
|
76
|
+
canonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: PlatformAlbum[];
|
|
77
|
+
getCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
78
|
+
setCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
79
|
+
addCanonAlbumIdPlatformAlbumCanonArtistAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
80
|
+
addCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
81
|
+
createCanonAlbumIdPlatformAlbumCanonArtistAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
|
|
82
|
+
removeCanonAlbumIdPlatformAlbumCanonArtistAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
83
|
+
removeCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
84
|
+
hasCanonAlbumIdPlatformAlbumCanonArtistAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
85
|
+
hasCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
86
|
+
countCanonAlbumIdPlatformAlbumCanonArtistAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
87
|
+
// CanonArtist belongsToMany PlatformArtist via canonArtistId and platformArtistId
|
|
88
|
+
platformArtistIdPlatformArtists!: PlatformArtist[];
|
|
89
|
+
getPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
|
|
90
|
+
setPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
91
|
+
addPlatformArtistIdPlatformArtist!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
92
|
+
addPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
93
|
+
createPlatformArtistIdPlatformArtist!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
|
|
94
|
+
removePlatformArtistIdPlatformArtist!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
95
|
+
removePlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
96
|
+
hasPlatformArtistIdPlatformArtist!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
97
|
+
hasPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
98
|
+
countPlatformArtistIdPlatformArtists!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
99
|
+
|
|
100
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtist {
|
|
101
|
+
return CanonArtist.init({
|
|
102
|
+
id: {
|
|
103
|
+
type: DataTypes.UUID,
|
|
104
|
+
allowNull: false,
|
|
105
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
106
|
+
primaryKey: true
|
|
107
|
+
},
|
|
108
|
+
name: {
|
|
109
|
+
type: DataTypes.TEXT,
|
|
110
|
+
allowNull: false
|
|
111
|
+
},
|
|
112
|
+
asciiName: {
|
|
113
|
+
type: DataTypes.TEXT,
|
|
114
|
+
allowNull: false,
|
|
115
|
+
field: 'ascii_name'
|
|
116
|
+
},
|
|
117
|
+
description: {
|
|
118
|
+
type: DataTypes.TEXT,
|
|
119
|
+
allowNull: true
|
|
120
|
+
},
|
|
121
|
+
hasPhoto: {
|
|
122
|
+
type: DataTypes.BOOLEAN,
|
|
123
|
+
allowNull: false,
|
|
124
|
+
defaultValue: false,
|
|
125
|
+
field: 'has_photo'
|
|
126
|
+
},
|
|
127
|
+
createDate: {
|
|
128
|
+
type: DataTypes.DATE,
|
|
129
|
+
allowNull: false,
|
|
130
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
131
|
+
field: 'create_date'
|
|
132
|
+
},
|
|
133
|
+
updateDate: {
|
|
134
|
+
type: DataTypes.DATE,
|
|
135
|
+
allowNull: false,
|
|
136
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
137
|
+
field: 'update_date'
|
|
138
|
+
},
|
|
139
|
+
hasThumbnailPhoto: {
|
|
140
|
+
type: DataTypes.BOOLEAN,
|
|
141
|
+
allowNull: true,
|
|
142
|
+
defaultValue: false,
|
|
143
|
+
field: 'has_thumbnail_photo'
|
|
144
|
+
},
|
|
145
|
+
images: {
|
|
146
|
+
type: DataTypes.JSONB,
|
|
147
|
+
allowNull: true
|
|
148
|
+
},
|
|
149
|
+
lastImageHarvestAttempt: {
|
|
150
|
+
type: DataTypes.DATE,
|
|
151
|
+
allowNull: true,
|
|
152
|
+
field: 'last_image_harvest_attempt'
|
|
153
|
+
}
|
|
154
|
+
}, {
|
|
155
|
+
sequelize,
|
|
156
|
+
tableName: 'canon_artist',
|
|
157
|
+
schema: 'eb',
|
|
158
|
+
timestamps: false,
|
|
159
|
+
indexes: [
|
|
160
|
+
{
|
|
161
|
+
name: "artist_name_idx",
|
|
162
|
+
unique: true,
|
|
163
|
+
fields: [
|
|
164
|
+
{ name: "name" },
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: "artist_pkey",
|
|
169
|
+
unique: true,
|
|
170
|
+
fields: [
|
|
171
|
+
{ name: "id" },
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "eb_canon_artist_last_image_harvest_attempt",
|
|
176
|
+
fields: [
|
|
177
|
+
{ name: "last_image_harvest_attempt" },
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
5
|
+
|
|
6
|
+
export interface CanonArtistAlbumRelationAttributes {
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
canonAlbumId: string;
|
|
9
|
+
createDate: Date;
|
|
10
|
+
updateDate: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CanonArtistAlbumRelationPk = "canonArtistId" | "canonAlbumId";
|
|
14
|
+
export type CanonArtistAlbumRelationId = CanonArtistAlbumRelation[CanonArtistAlbumRelationPk];
|
|
15
|
+
export type CanonArtistAlbumRelationOptionalAttributes = "createDate" | "updateDate";
|
|
16
|
+
export type CanonArtistAlbumRelationCreationAttributes = Optional<CanonArtistAlbumRelationAttributes, CanonArtistAlbumRelationOptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class CanonArtistAlbumRelation extends Model<CanonArtistAlbumRelationAttributes, CanonArtistAlbumRelationCreationAttributes> implements CanonArtistAlbumRelationAttributes {
|
|
19
|
+
canonArtistId!: string;
|
|
20
|
+
canonAlbumId!: string;
|
|
21
|
+
createDate!: Date;
|
|
22
|
+
updateDate!: Date;
|
|
23
|
+
|
|
24
|
+
// CanonArtistAlbumRelation belongsTo CanonArtist via canonArtistId
|
|
25
|
+
canonArtist!: CanonArtist;
|
|
26
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
27
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
28
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
29
|
+
// CanonArtistAlbumRelation belongsTo PlatformAlbum via canonAlbumId
|
|
30
|
+
canonAlbum!: PlatformAlbum;
|
|
31
|
+
getCanonAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
|
|
32
|
+
setCanonAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
33
|
+
createCanonAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
|
|
34
|
+
|
|
35
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistAlbumRelation {
|
|
36
|
+
return CanonArtistAlbumRelation.init({
|
|
37
|
+
canonArtistId: {
|
|
38
|
+
type: DataTypes.UUID,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
primaryKey: true,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'canon_artist',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
field: 'canon_artist_id'
|
|
46
|
+
},
|
|
47
|
+
canonAlbumId: {
|
|
48
|
+
type: DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
primaryKey: true,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'platform_album',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
field: 'canon_album_id'
|
|
56
|
+
},
|
|
57
|
+
createDate: {
|
|
58
|
+
type: DataTypes.DATE,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
61
|
+
field: 'create_date'
|
|
62
|
+
},
|
|
63
|
+
updateDate: {
|
|
64
|
+
type: DataTypes.DATE,
|
|
65
|
+
allowNull: false,
|
|
66
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
67
|
+
field: 'update_date'
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
sequelize,
|
|
71
|
+
tableName: 'canon_artist_album_relation',
|
|
72
|
+
schema: 'eb',
|
|
73
|
+
timestamps: false,
|
|
74
|
+
indexes: [
|
|
75
|
+
{
|
|
76
|
+
name: "canon_artist_album_relation_pkey",
|
|
77
|
+
unique: true,
|
|
78
|
+
fields: [
|
|
79
|
+
{ name: "canon_artist_id" },
|
|
80
|
+
{ name: "canon_album_id" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
4
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
5
|
+
|
|
6
|
+
export interface CanonArtistExternalReferenceRelationAttributes {
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
externalReferenceId: string;
|
|
9
|
+
url: string;
|
|
10
|
+
createDate: Date;
|
|
11
|
+
updateDate: Date;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CanonArtistExternalReferenceRelationPk = "canonArtistId" | "externalReferenceId";
|
|
15
|
+
export type CanonArtistExternalReferenceRelationId = CanonArtistExternalReferenceRelation[CanonArtistExternalReferenceRelationPk];
|
|
16
|
+
export type CanonArtistExternalReferenceRelationOptionalAttributes = "createDate" | "updateDate";
|
|
17
|
+
export type CanonArtistExternalReferenceRelationCreationAttributes = Optional<CanonArtistExternalReferenceRelationAttributes, CanonArtistExternalReferenceRelationOptionalAttributes>;
|
|
18
|
+
|
|
19
|
+
export class CanonArtistExternalReferenceRelation extends Model<CanonArtistExternalReferenceRelationAttributes, CanonArtistExternalReferenceRelationCreationAttributes> implements CanonArtistExternalReferenceRelationAttributes {
|
|
20
|
+
canonArtistId!: string;
|
|
21
|
+
externalReferenceId!: string;
|
|
22
|
+
url!: string;
|
|
23
|
+
createDate!: Date;
|
|
24
|
+
updateDate!: Date;
|
|
25
|
+
|
|
26
|
+
// CanonArtistExternalReferenceRelation belongsTo ExternalReference via externalReferenceId
|
|
27
|
+
externalReference!: ExternalReference;
|
|
28
|
+
getExternalReference!: Sequelize.BelongsToGetAssociationMixin<ExternalReference>;
|
|
29
|
+
setExternalReference!: Sequelize.BelongsToSetAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
30
|
+
createExternalReference!: Sequelize.BelongsToCreateAssociationMixin<ExternalReference>;
|
|
31
|
+
// CanonArtistExternalReferenceRelation belongsTo PlatformArtist via canonArtistId
|
|
32
|
+
canonArtist!: PlatformArtist;
|
|
33
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
|
|
34
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
35
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
|
|
36
|
+
|
|
37
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistExternalReferenceRelation {
|
|
38
|
+
return CanonArtistExternalReferenceRelation.init({
|
|
39
|
+
canonArtistId: {
|
|
40
|
+
type: DataTypes.UUID,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
primaryKey: true,
|
|
43
|
+
references: {
|
|
44
|
+
model: 'platform_artist',
|
|
45
|
+
key: 'id'
|
|
46
|
+
},
|
|
47
|
+
field: 'canon_artist_id'
|
|
48
|
+
},
|
|
49
|
+
externalReferenceId: {
|
|
50
|
+
type: DataTypes.UUID,
|
|
51
|
+
allowNull: false,
|
|
52
|
+
primaryKey: true,
|
|
53
|
+
references: {
|
|
54
|
+
model: 'external_reference',
|
|
55
|
+
key: 'id'
|
|
56
|
+
},
|
|
57
|
+
field: 'external_reference_id'
|
|
58
|
+
},
|
|
59
|
+
url: {
|
|
60
|
+
type: DataTypes.TEXT,
|
|
61
|
+
allowNull: false
|
|
62
|
+
},
|
|
63
|
+
createDate: {
|
|
64
|
+
type: DataTypes.DATE,
|
|
65
|
+
allowNull: false,
|
|
66
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
67
|
+
field: 'create_date'
|
|
68
|
+
},
|
|
69
|
+
updateDate: {
|
|
70
|
+
type: DataTypes.DATE,
|
|
71
|
+
allowNull: false,
|
|
72
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
73
|
+
field: 'update_date'
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
sequelize,
|
|
77
|
+
tableName: 'canon_artist_external_reference_relation',
|
|
78
|
+
schema: 'eb',
|
|
79
|
+
timestamps: false,
|
|
80
|
+
indexes: [
|
|
81
|
+
{
|
|
82
|
+
name: "canon_artist_external_reference_relation_pk",
|
|
83
|
+
unique: true,
|
|
84
|
+
fields: [
|
|
85
|
+
{ name: "canon_artist_id" },
|
|
86
|
+
{ name: "external_reference_id" },
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonGenre, CanonGenreId } from './CanonGenre';
|
|
4
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
5
|
+
|
|
6
|
+
export interface CanonArtistGenreRelationAttributes {
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
canonGenreId: string;
|
|
9
|
+
createDate: Date;
|
|
10
|
+
updateDate: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CanonArtistGenreRelationPk = "canonArtistId" | "canonGenreId";
|
|
14
|
+
export type CanonArtistGenreRelationId = CanonArtistGenreRelation[CanonArtistGenreRelationPk];
|
|
15
|
+
export type CanonArtistGenreRelationOptionalAttributes = "createDate" | "updateDate";
|
|
16
|
+
export type CanonArtistGenreRelationCreationAttributes = Optional<CanonArtistGenreRelationAttributes, CanonArtistGenreRelationOptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class CanonArtistGenreRelation extends Model<CanonArtistGenreRelationAttributes, CanonArtistGenreRelationCreationAttributes> implements CanonArtistGenreRelationAttributes {
|
|
19
|
+
canonArtistId!: string;
|
|
20
|
+
canonGenreId!: string;
|
|
21
|
+
createDate!: Date;
|
|
22
|
+
updateDate!: Date;
|
|
23
|
+
|
|
24
|
+
// CanonArtistGenreRelation belongsTo CanonGenre via canonGenreId
|
|
25
|
+
canonGenre!: CanonGenre;
|
|
26
|
+
getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
|
|
27
|
+
setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
|
|
28
|
+
createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
|
|
29
|
+
// CanonArtistGenreRelation belongsTo PlatformArtist via canonArtistId
|
|
30
|
+
canonArtist!: PlatformArtist;
|
|
31
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
|
|
32
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
33
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
|
|
34
|
+
|
|
35
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistGenreRelation {
|
|
36
|
+
return CanonArtistGenreRelation.init({
|
|
37
|
+
canonArtistId: {
|
|
38
|
+
type: DataTypes.UUID,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
primaryKey: true,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'platform_artist',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
field: 'canon_artist_id'
|
|
46
|
+
},
|
|
47
|
+
canonGenreId: {
|
|
48
|
+
type: DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
primaryKey: true,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'canon_genre',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
field: 'canon_genre_id'
|
|
56
|
+
},
|
|
57
|
+
createDate: {
|
|
58
|
+
type: DataTypes.DATE,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
61
|
+
field: 'create_date'
|
|
62
|
+
},
|
|
63
|
+
updateDate: {
|
|
64
|
+
type: DataTypes.DATE,
|
|
65
|
+
allowNull: false,
|
|
66
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
67
|
+
field: 'update_date'
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
sequelize,
|
|
71
|
+
tableName: 'canon_artist_genre_relation',
|
|
72
|
+
schema: 'eb',
|
|
73
|
+
timestamps: false,
|
|
74
|
+
indexes: [
|
|
75
|
+
{
|
|
76
|
+
name: "canon_artist_genre_relation_pkey",
|
|
77
|
+
unique: true,
|
|
78
|
+
fields: [
|
|
79
|
+
{ name: "canon_artist_id" },
|
|
80
|
+
{ name: "canon_genre_id" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
|
+
|
|
5
|
+
export interface CanonArtistImageHarvestedAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
priority?: number;
|
|
9
|
+
url?: string;
|
|
10
|
+
dateHarvested: Date;
|
|
11
|
+
storageKey: string;
|
|
12
|
+
harvestMethod?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type CanonArtistImageHarvestedPk = "id";
|
|
16
|
+
export type CanonArtistImageHarvestedId = CanonArtistImageHarvested[CanonArtistImageHarvestedPk];
|
|
17
|
+
export type CanonArtistImageHarvestedOptionalAttributes = "id" | "priority" | "url" | "harvestMethod";
|
|
18
|
+
export type CanonArtistImageHarvestedCreationAttributes = Optional<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedOptionalAttributes>;
|
|
19
|
+
|
|
20
|
+
export class CanonArtistImageHarvested extends Model<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedCreationAttributes> implements CanonArtistImageHarvestedAttributes {
|
|
21
|
+
id!: string;
|
|
22
|
+
canonArtistId!: string;
|
|
23
|
+
priority?: number;
|
|
24
|
+
url?: string;
|
|
25
|
+
dateHarvested!: Date;
|
|
26
|
+
storageKey!: string;
|
|
27
|
+
harvestMethod?: string;
|
|
28
|
+
|
|
29
|
+
// CanonArtistImageHarvested belongsTo CanonArtist via canonArtistId
|
|
30
|
+
canonArtist!: CanonArtist;
|
|
31
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
32
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
33
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
34
|
+
|
|
35
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistImageHarvested {
|
|
36
|
+
return CanonArtistImageHarvested.init({
|
|
37
|
+
id: {
|
|
38
|
+
type: DataTypes.UUID,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
defaultValue: DataTypes.UUIDV4,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
43
|
+
canonArtistId: {
|
|
44
|
+
type: DataTypes.UUID,
|
|
45
|
+
allowNull: false,
|
|
46
|
+
references: {
|
|
47
|
+
model: 'canon_artist',
|
|
48
|
+
key: 'id'
|
|
49
|
+
},
|
|
50
|
+
field: 'canon_artist_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
|
+
},
|
|
61
|
+
dateHarvested: {
|
|
62
|
+
type: DataTypes.DATE,
|
|
63
|
+
allowNull: false,
|
|
64
|
+
field: 'date_harvested'
|
|
65
|
+
},
|
|
66
|
+
storageKey: {
|
|
67
|
+
type: DataTypes.STRING(255),
|
|
68
|
+
allowNull: false,
|
|
69
|
+
field: 'storage_key'
|
|
70
|
+
},
|
|
71
|
+
harvestMethod: {
|
|
72
|
+
type: DataTypes.STRING(255),
|
|
73
|
+
allowNull: true,
|
|
74
|
+
field: 'harvest_method'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
sequelize,
|
|
78
|
+
tableName: 'canon_artist_image_harvested',
|
|
79
|
+
schema: 'eb',
|
|
80
|
+
timestamps: false,
|
|
81
|
+
indexes: [
|
|
82
|
+
{
|
|
83
|
+
name: "canon_artist_image_harvested_canon_artist_id_index",
|
|
84
|
+
fields: [
|
|
85
|
+
{ name: "canon_artist_id" },
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "canon_artist_image_harvested_pkey",
|
|
90
|
+
unique: true,
|
|
91
|
+
fields: [
|
|
92
|
+
{ name: "id" },
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonMember, CanonMemberId } from './CanonMember';
|
|
4
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
5
|
+
|
|
6
|
+
export interface CanonArtistMemberRelationAttributes {
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
canonMemberId: string;
|
|
9
|
+
createDate: Date;
|
|
10
|
+
updateDate: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CanonArtistMemberRelationPk = "canonArtistId" | "canonMemberId";
|
|
14
|
+
export type CanonArtistMemberRelationId = CanonArtistMemberRelation[CanonArtistMemberRelationPk];
|
|
15
|
+
export type CanonArtistMemberRelationOptionalAttributes = "createDate" | "updateDate";
|
|
16
|
+
export type CanonArtistMemberRelationCreationAttributes = Optional<CanonArtistMemberRelationAttributes, CanonArtistMemberRelationOptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class CanonArtistMemberRelation extends Model<CanonArtistMemberRelationAttributes, CanonArtistMemberRelationCreationAttributes> implements CanonArtistMemberRelationAttributes {
|
|
19
|
+
canonArtistId!: string;
|
|
20
|
+
canonMemberId!: string;
|
|
21
|
+
createDate!: Date;
|
|
22
|
+
updateDate!: Date;
|
|
23
|
+
|
|
24
|
+
// CanonArtistMemberRelation belongsTo CanonMember via canonMemberId
|
|
25
|
+
canonMember!: CanonMember;
|
|
26
|
+
getCanonMember!: Sequelize.BelongsToGetAssociationMixin<CanonMember>;
|
|
27
|
+
setCanonMember!: Sequelize.BelongsToSetAssociationMixin<CanonMember, CanonMemberId>;
|
|
28
|
+
createCanonMember!: Sequelize.BelongsToCreateAssociationMixin<CanonMember>;
|
|
29
|
+
// CanonArtistMemberRelation belongsTo PlatformArtist via canonArtistId
|
|
30
|
+
canonArtist!: PlatformArtist;
|
|
31
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
|
|
32
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
33
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
|
|
34
|
+
|
|
35
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistMemberRelation {
|
|
36
|
+
return CanonArtistMemberRelation.init({
|
|
37
|
+
canonArtistId: {
|
|
38
|
+
type: DataTypes.UUID,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
primaryKey: true,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'platform_artist',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
field: 'canon_artist_id'
|
|
46
|
+
},
|
|
47
|
+
canonMemberId: {
|
|
48
|
+
type: DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
primaryKey: true,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'canon_member',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
field: 'canon_member_id'
|
|
56
|
+
},
|
|
57
|
+
createDate: {
|
|
58
|
+
type: DataTypes.DATE,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
61
|
+
field: 'create_date'
|
|
62
|
+
},
|
|
63
|
+
updateDate: {
|
|
64
|
+
type: DataTypes.DATE,
|
|
65
|
+
allowNull: false,
|
|
66
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
67
|
+
field: 'update_date'
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
sequelize,
|
|
71
|
+
tableName: 'canon_artist_member_relation',
|
|
72
|
+
schema: 'eb',
|
|
73
|
+
timestamps: false,
|
|
74
|
+
indexes: [
|
|
75
|
+
{
|
|
76
|
+
name: "canon_artist_member_relation_pk",
|
|
77
|
+
unique: true,
|
|
78
|
+
fields: [
|
|
79
|
+
{ name: "canon_artist_id" },
|
|
80
|
+
{ name: "canon_member_id" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|