@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,86 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
4
|
+
import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
5
|
+
|
|
6
|
+
export interface CanonArtistTrackRelationAttributes {
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
canonTrackId: string;
|
|
9
|
+
createDate: Date;
|
|
10
|
+
updateDate: Date;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CanonArtistTrackRelationPk = "canonArtistId" | "canonTrackId";
|
|
14
|
+
export type CanonArtistTrackRelationId = CanonArtistTrackRelation[CanonArtistTrackRelationPk];
|
|
15
|
+
export type CanonArtistTrackRelationOptionalAttributes = "createDate" | "updateDate";
|
|
16
|
+
export type CanonArtistTrackRelationCreationAttributes = Optional<CanonArtistTrackRelationAttributes, CanonArtistTrackRelationOptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class CanonArtistTrackRelation extends Model<CanonArtistTrackRelationAttributes, CanonArtistTrackRelationCreationAttributes> implements CanonArtistTrackRelationAttributes {
|
|
19
|
+
canonArtistId!: string;
|
|
20
|
+
canonTrackId!: string;
|
|
21
|
+
createDate!: Date;
|
|
22
|
+
updateDate!: Date;
|
|
23
|
+
|
|
24
|
+
// CanonArtistTrackRelation belongsTo PlatformArtist via canonArtistId
|
|
25
|
+
canonArtist!: PlatformArtist;
|
|
26
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
|
|
27
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
28
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
|
|
29
|
+
// CanonArtistTrackRelation belongsTo PlatformTrack via canonTrackId
|
|
30
|
+
canonTrack!: PlatformTrack;
|
|
31
|
+
getCanonTrack!: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
|
|
32
|
+
setCanonTrack!: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
33
|
+
createCanonTrack!: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
|
|
34
|
+
|
|
35
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistTrackRelation {
|
|
36
|
+
return CanonArtistTrackRelation.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
|
+
canonTrackId: {
|
|
48
|
+
type: DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
primaryKey: true,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'platform_track',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
field: 'canon_track_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_track_relation',
|
|
72
|
+
schema: 'eb',
|
|
73
|
+
timestamps: false,
|
|
74
|
+
indexes: [
|
|
75
|
+
{
|
|
76
|
+
name: "canon_artist_track_relation_pkey",
|
|
77
|
+
unique: true,
|
|
78
|
+
fields: [
|
|
79
|
+
{ name: "canon_artist_id" },
|
|
80
|
+
{ name: "canon_track_id" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonAlbumGenreRelation, CanonAlbumGenreRelationId } from './CanonAlbumGenreRelation';
|
|
4
|
+
import type { CanonArtistGenreRelation, CanonArtistGenreRelationId } from './CanonArtistGenreRelation';
|
|
5
|
+
import type { CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId } from './CanonGenreExternalReferenceRelation';
|
|
6
|
+
import type { CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId } from './CanonToPlatformGenreRelation';
|
|
7
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
8
|
+
import type { JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId } from './JukeboxCanonGenreRelation';
|
|
9
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
10
|
+
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
11
|
+
import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
|
|
12
|
+
|
|
13
|
+
export interface CanonGenreAttributes {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
asciiName: string;
|
|
17
|
+
description: string;
|
|
18
|
+
parentGenreId?: string;
|
|
19
|
+
createDate: Date;
|
|
20
|
+
updateDate: Date;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type CanonGenrePk = "id";
|
|
24
|
+
export type CanonGenreId = CanonGenre[CanonGenrePk];
|
|
25
|
+
export type CanonGenreOptionalAttributes = "id" | "parentGenreId" | "createDate" | "updateDate";
|
|
26
|
+
export type CanonGenreCreationAttributes = Optional<CanonGenreAttributes, CanonGenreOptionalAttributes>;
|
|
27
|
+
|
|
28
|
+
export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAttributes> implements CanonGenreAttributes {
|
|
29
|
+
id!: string;
|
|
30
|
+
name!: string;
|
|
31
|
+
asciiName!: string;
|
|
32
|
+
description!: string;
|
|
33
|
+
parentGenreId?: string;
|
|
34
|
+
createDate!: Date;
|
|
35
|
+
updateDate!: Date;
|
|
36
|
+
|
|
37
|
+
// CanonGenre hasMany CanonAlbumGenreRelation via canonGenreId
|
|
38
|
+
canonAlbumGenreRelations!: CanonAlbumGenreRelation[];
|
|
39
|
+
getCanonAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumGenreRelation>;
|
|
40
|
+
setCanonAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
41
|
+
addCanonAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
42
|
+
addCanonAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
43
|
+
createCanonAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumGenreRelation>;
|
|
44
|
+
removeCanonAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
45
|
+
removeCanonAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
46
|
+
hasCanonAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
47
|
+
hasCanonAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
|
|
48
|
+
countCanonAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
49
|
+
// CanonGenre hasMany CanonArtistGenreRelation via canonGenreId
|
|
50
|
+
canonArtistGenreRelations!: CanonArtistGenreRelation[];
|
|
51
|
+
getCanonArtistGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistGenreRelation>;
|
|
52
|
+
setCanonArtistGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
53
|
+
addCanonArtistGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
54
|
+
addCanonArtistGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
55
|
+
createCanonArtistGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistGenreRelation>;
|
|
56
|
+
removeCanonArtistGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
57
|
+
removeCanonArtistGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
58
|
+
hasCanonArtistGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
59
|
+
hasCanonArtistGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
|
|
60
|
+
countCanonArtistGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
61
|
+
// CanonGenre hasMany CanonGenreExternalReferenceRelation via canonGenreId
|
|
62
|
+
canonGenreExternalReferenceRelations!: CanonGenreExternalReferenceRelation[];
|
|
63
|
+
getCanonGenreExternalReferenceRelations!: Sequelize.HasManyGetAssociationsMixin<CanonGenreExternalReferenceRelation>;
|
|
64
|
+
setCanonGenreExternalReferenceRelations!: Sequelize.HasManySetAssociationsMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
65
|
+
addCanonGenreExternalReferenceRelation!: Sequelize.HasManyAddAssociationMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
66
|
+
addCanonGenreExternalReferenceRelations!: Sequelize.HasManyAddAssociationsMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
67
|
+
createCanonGenreExternalReferenceRelation!: Sequelize.HasManyCreateAssociationMixin<CanonGenreExternalReferenceRelation>;
|
|
68
|
+
removeCanonGenreExternalReferenceRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
69
|
+
removeCanonGenreExternalReferenceRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
70
|
+
hasCanonGenreExternalReferenceRelation!: Sequelize.HasManyHasAssociationMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
71
|
+
hasCanonGenreExternalReferenceRelations!: Sequelize.HasManyHasAssociationsMixin<CanonGenreExternalReferenceRelation, CanonGenreExternalReferenceRelationId>;
|
|
72
|
+
countCanonGenreExternalReferenceRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
73
|
+
// CanonGenre hasMany CanonToPlatformGenreRelation via canonGenreId
|
|
74
|
+
canonToPlatformGenreRelations!: CanonToPlatformGenreRelation[];
|
|
75
|
+
getCanonToPlatformGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformGenreRelation>;
|
|
76
|
+
setCanonToPlatformGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
77
|
+
addCanonToPlatformGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
78
|
+
addCanonToPlatformGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
79
|
+
createCanonToPlatformGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformGenreRelation>;
|
|
80
|
+
removeCanonToPlatformGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
81
|
+
removeCanonToPlatformGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
82
|
+
hasCanonToPlatformGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
83
|
+
hasCanonToPlatformGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
|
|
84
|
+
countCanonToPlatformGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
85
|
+
// CanonGenre belongsToMany ExternalReference via canonGenreId and externalReferenceId
|
|
86
|
+
externalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: ExternalReference[];
|
|
87
|
+
getExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
|
|
88
|
+
setExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManySetAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
89
|
+
addExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelation!: Sequelize.BelongsToManyAddAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
90
|
+
addExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManyAddAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
91
|
+
createExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelation!: Sequelize.BelongsToManyCreateAssociationMixin<ExternalReference>;
|
|
92
|
+
removeExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
93
|
+
removeExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
94
|
+
hasExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelation!: Sequelize.BelongsToManyHasAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
95
|
+
hasExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManyHasAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
96
|
+
countExternalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
97
|
+
// CanonGenre hasMany JukeboxCanonGenreRelation via canonGenreId
|
|
98
|
+
jukeboxCanonGenreRelations!: JukeboxCanonGenreRelation[];
|
|
99
|
+
getJukeboxCanonGenreRelations!: Sequelize.HasManyGetAssociationsMixin<JukeboxCanonGenreRelation>;
|
|
100
|
+
setJukeboxCanonGenreRelations!: Sequelize.HasManySetAssociationsMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
101
|
+
addJukeboxCanonGenreRelation!: Sequelize.HasManyAddAssociationMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
102
|
+
addJukeboxCanonGenreRelations!: Sequelize.HasManyAddAssociationsMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
103
|
+
createJukeboxCanonGenreRelation!: Sequelize.HasManyCreateAssociationMixin<JukeboxCanonGenreRelation>;
|
|
104
|
+
removeJukeboxCanonGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
105
|
+
removeJukeboxCanonGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
106
|
+
hasJukeboxCanonGenreRelation!: Sequelize.HasManyHasAssociationMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
107
|
+
hasJukeboxCanonGenreRelations!: Sequelize.HasManyHasAssociationsMixin<JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId>;
|
|
108
|
+
countJukeboxCanonGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
109
|
+
// CanonGenre belongsToMany PlatformAlbum via canonGenreId and canonAlbumId
|
|
110
|
+
canonAlbumIdPlatformAlbums!: PlatformAlbum[];
|
|
111
|
+
getCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
112
|
+
setCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
113
|
+
addCanonAlbumIdPlatformAlbum!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
114
|
+
addCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
115
|
+
createCanonAlbumIdPlatformAlbum!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
|
|
116
|
+
removeCanonAlbumIdPlatformAlbum!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
117
|
+
removeCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
118
|
+
hasCanonAlbumIdPlatformAlbum!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
119
|
+
hasCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
120
|
+
countCanonAlbumIdPlatformAlbums!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
121
|
+
// CanonGenre belongsToMany PlatformArtist via canonGenreId and canonArtistId
|
|
122
|
+
canonArtistIdPlatformArtistCanonArtistGenreRelations!: PlatformArtist[];
|
|
123
|
+
getCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
|
|
124
|
+
setCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
125
|
+
addCanonArtistIdPlatformArtistCanonArtistGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
126
|
+
addCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
127
|
+
createCanonArtistIdPlatformArtistCanonArtistGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
|
|
128
|
+
removeCanonArtistIdPlatformArtistCanonArtistGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
129
|
+
removeCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
130
|
+
hasCanonArtistIdPlatformArtistCanonArtistGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
|
|
131
|
+
hasCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
|
|
132
|
+
countCanonArtistIdPlatformArtistCanonArtistGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
133
|
+
// CanonGenre belongsToMany PlatformGenre via canonGenreId and platformGenreId
|
|
134
|
+
platformGenreIdPlatformGenres!: PlatformGenre[];
|
|
135
|
+
getPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformGenre>;
|
|
136
|
+
setPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
137
|
+
addPlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
138
|
+
addPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
139
|
+
createPlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformGenre>;
|
|
140
|
+
removePlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
141
|
+
removePlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
142
|
+
hasPlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
143
|
+
hasPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
144
|
+
countPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
145
|
+
|
|
146
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenre {
|
|
147
|
+
return CanonGenre.init({
|
|
148
|
+
id: {
|
|
149
|
+
type: DataTypes.UUID,
|
|
150
|
+
allowNull: false,
|
|
151
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
152
|
+
primaryKey: true
|
|
153
|
+
},
|
|
154
|
+
name: {
|
|
155
|
+
type: DataTypes.TEXT,
|
|
156
|
+
allowNull: false,
|
|
157
|
+
unique: "genre_name_pkey"
|
|
158
|
+
},
|
|
159
|
+
asciiName: {
|
|
160
|
+
type: DataTypes.TEXT,
|
|
161
|
+
allowNull: false,
|
|
162
|
+
field: 'ascii_name'
|
|
163
|
+
},
|
|
164
|
+
description: {
|
|
165
|
+
type: DataTypes.TEXT,
|
|
166
|
+
allowNull: false
|
|
167
|
+
},
|
|
168
|
+
parentGenreId: {
|
|
169
|
+
type: DataTypes.UUID,
|
|
170
|
+
allowNull: true,
|
|
171
|
+
field: 'parent_genre_id'
|
|
172
|
+
},
|
|
173
|
+
createDate: {
|
|
174
|
+
type: DataTypes.DATE,
|
|
175
|
+
allowNull: false,
|
|
176
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
177
|
+
field: 'create_date'
|
|
178
|
+
},
|
|
179
|
+
updateDate: {
|
|
180
|
+
type: DataTypes.DATE,
|
|
181
|
+
allowNull: false,
|
|
182
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
183
|
+
field: 'update_date'
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
sequelize,
|
|
187
|
+
tableName: 'canon_genre',
|
|
188
|
+
schema: 'eb',
|
|
189
|
+
timestamps: false,
|
|
190
|
+
indexes: [
|
|
191
|
+
{
|
|
192
|
+
name: "genre_name_pkey",
|
|
193
|
+
unique: true,
|
|
194
|
+
fields: [
|
|
195
|
+
{ name: "name" },
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "genre_pkey",
|
|
200
|
+
unique: true,
|
|
201
|
+
fields: [
|
|
202
|
+
{ name: "id" },
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonGenre, CanonGenreId } from './CanonGenre';
|
|
4
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
5
|
+
|
|
6
|
+
export interface CanonGenreExternalReferenceRelationAttributes {
|
|
7
|
+
canonGenreId: string;
|
|
8
|
+
externalReferenceId: string;
|
|
9
|
+
url: string;
|
|
10
|
+
createDate: Date;
|
|
11
|
+
updateDate: Date;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CanonGenreExternalReferenceRelationPk = "canonGenreId" | "externalReferenceId";
|
|
15
|
+
export type CanonGenreExternalReferenceRelationId = CanonGenreExternalReferenceRelation[CanonGenreExternalReferenceRelationPk];
|
|
16
|
+
export type CanonGenreExternalReferenceRelationOptionalAttributes = "createDate" | "updateDate";
|
|
17
|
+
export type CanonGenreExternalReferenceRelationCreationAttributes = Optional<CanonGenreExternalReferenceRelationAttributes, CanonGenreExternalReferenceRelationOptionalAttributes>;
|
|
18
|
+
|
|
19
|
+
export class CanonGenreExternalReferenceRelation extends Model<CanonGenreExternalReferenceRelationAttributes, CanonGenreExternalReferenceRelationCreationAttributes> implements CanonGenreExternalReferenceRelationAttributes {
|
|
20
|
+
canonGenreId!: string;
|
|
21
|
+
externalReferenceId!: string;
|
|
22
|
+
url!: string;
|
|
23
|
+
createDate!: Date;
|
|
24
|
+
updateDate!: Date;
|
|
25
|
+
|
|
26
|
+
// CanonGenreExternalReferenceRelation belongsTo CanonGenre via canonGenreId
|
|
27
|
+
canonGenre!: CanonGenre;
|
|
28
|
+
getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
|
|
29
|
+
setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
|
|
30
|
+
createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
|
|
31
|
+
// CanonGenreExternalReferenceRelation belongsTo ExternalReference via externalReferenceId
|
|
32
|
+
externalReference!: ExternalReference;
|
|
33
|
+
getExternalReference!: Sequelize.BelongsToGetAssociationMixin<ExternalReference>;
|
|
34
|
+
setExternalReference!: Sequelize.BelongsToSetAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
35
|
+
createExternalReference!: Sequelize.BelongsToCreateAssociationMixin<ExternalReference>;
|
|
36
|
+
|
|
37
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenreExternalReferenceRelation {
|
|
38
|
+
return CanonGenreExternalReferenceRelation.init({
|
|
39
|
+
canonGenreId: {
|
|
40
|
+
type: DataTypes.UUID,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
primaryKey: true,
|
|
43
|
+
references: {
|
|
44
|
+
model: 'canon_genre',
|
|
45
|
+
key: 'id'
|
|
46
|
+
},
|
|
47
|
+
field: 'canon_genre_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_genre_external_reference_relation',
|
|
78
|
+
schema: 'eb',
|
|
79
|
+
timestamps: false,
|
|
80
|
+
indexes: [
|
|
81
|
+
{
|
|
82
|
+
name: "canon_genre_external_reference_relation_pk",
|
|
83
|
+
unique: true,
|
|
84
|
+
fields: [
|
|
85
|
+
{ name: "external_reference_id" },
|
|
86
|
+
{ name: "canon_genre_id" },
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonAlbumLabelRelation, CanonAlbumLabelRelationId } from './CanonAlbumLabelRelation';
|
|
4
|
+
import type { CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId } from './CanonLabelExternalReferenceRelation';
|
|
5
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
6
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
7
|
+
|
|
8
|
+
export interface CanonLabelAttributes {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
asciiName: string;
|
|
12
|
+
createDate: Date;
|
|
13
|
+
updateDate: Date;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type CanonLabelPk = "id";
|
|
17
|
+
export type CanonLabelId = CanonLabel[CanonLabelPk];
|
|
18
|
+
export type CanonLabelOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
19
|
+
export type CanonLabelCreationAttributes = Optional<CanonLabelAttributes, CanonLabelOptionalAttributes>;
|
|
20
|
+
|
|
21
|
+
export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAttributes> implements CanonLabelAttributes {
|
|
22
|
+
id!: string;
|
|
23
|
+
name!: string;
|
|
24
|
+
asciiName!: string;
|
|
25
|
+
createDate!: Date;
|
|
26
|
+
updateDate!: Date;
|
|
27
|
+
|
|
28
|
+
// CanonLabel hasMany CanonAlbumLabelRelation via canonLabelId
|
|
29
|
+
canonAlbumLabelRelations!: CanonAlbumLabelRelation[];
|
|
30
|
+
getCanonAlbumLabelRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumLabelRelation>;
|
|
31
|
+
setCanonAlbumLabelRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
32
|
+
addCanonAlbumLabelRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
33
|
+
addCanonAlbumLabelRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
34
|
+
createCanonAlbumLabelRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumLabelRelation>;
|
|
35
|
+
removeCanonAlbumLabelRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
36
|
+
removeCanonAlbumLabelRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
37
|
+
hasCanonAlbumLabelRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
38
|
+
hasCanonAlbumLabelRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
|
|
39
|
+
countCanonAlbumLabelRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
40
|
+
// CanonLabel hasMany CanonLabelExternalReferenceRelation via canonLabelId
|
|
41
|
+
canonLabelExternalReferenceRelations!: CanonLabelExternalReferenceRelation[];
|
|
42
|
+
getCanonLabelExternalReferenceRelations!: Sequelize.HasManyGetAssociationsMixin<CanonLabelExternalReferenceRelation>;
|
|
43
|
+
setCanonLabelExternalReferenceRelations!: Sequelize.HasManySetAssociationsMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
44
|
+
addCanonLabelExternalReferenceRelation!: Sequelize.HasManyAddAssociationMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
45
|
+
addCanonLabelExternalReferenceRelations!: Sequelize.HasManyAddAssociationsMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
46
|
+
createCanonLabelExternalReferenceRelation!: Sequelize.HasManyCreateAssociationMixin<CanonLabelExternalReferenceRelation>;
|
|
47
|
+
removeCanonLabelExternalReferenceRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
48
|
+
removeCanonLabelExternalReferenceRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
49
|
+
hasCanonLabelExternalReferenceRelation!: Sequelize.HasManyHasAssociationMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
50
|
+
hasCanonLabelExternalReferenceRelations!: Sequelize.HasManyHasAssociationsMixin<CanonLabelExternalReferenceRelation, CanonLabelExternalReferenceRelationId>;
|
|
51
|
+
countCanonLabelExternalReferenceRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
52
|
+
// CanonLabel belongsToMany ExternalReference via canonLabelId and externalReferenceId
|
|
53
|
+
externalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: ExternalReference[];
|
|
54
|
+
getExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
|
|
55
|
+
setExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManySetAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
56
|
+
addExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelation!: Sequelize.BelongsToManyAddAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
57
|
+
addExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManyAddAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
58
|
+
createExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelation!: Sequelize.BelongsToManyCreateAssociationMixin<ExternalReference>;
|
|
59
|
+
removeExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
60
|
+
removeExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
61
|
+
hasExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelation!: Sequelize.BelongsToManyHasAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
62
|
+
hasExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManyHasAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
63
|
+
countExternalReferenceIdExternalReferenceCanonLabelExternalReferenceRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
64
|
+
// CanonLabel belongsToMany PlatformAlbum via canonLabelId and canonAlbumId
|
|
65
|
+
canonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: PlatformAlbum[];
|
|
66
|
+
getCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
67
|
+
setCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
68
|
+
addCanonAlbumIdPlatformAlbumCanonAlbumLabelRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
69
|
+
addCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
70
|
+
createCanonAlbumIdPlatformAlbumCanonAlbumLabelRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
|
|
71
|
+
removeCanonAlbumIdPlatformAlbumCanonAlbumLabelRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
72
|
+
removeCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
73
|
+
hasCanonAlbumIdPlatformAlbumCanonAlbumLabelRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
74
|
+
hasCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
75
|
+
countCanonAlbumIdPlatformAlbumCanonAlbumLabelRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
76
|
+
|
|
77
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonLabel {
|
|
78
|
+
return CanonLabel.init({
|
|
79
|
+
id: {
|
|
80
|
+
type: DataTypes.UUID,
|
|
81
|
+
allowNull: false,
|
|
82
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
83
|
+
primaryKey: true
|
|
84
|
+
},
|
|
85
|
+
name: {
|
|
86
|
+
type: DataTypes.TEXT,
|
|
87
|
+
allowNull: false
|
|
88
|
+
},
|
|
89
|
+
asciiName: {
|
|
90
|
+
type: DataTypes.TEXT,
|
|
91
|
+
allowNull: false,
|
|
92
|
+
field: 'ascii_name'
|
|
93
|
+
},
|
|
94
|
+
createDate: {
|
|
95
|
+
type: DataTypes.DATE,
|
|
96
|
+
allowNull: false,
|
|
97
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
98
|
+
field: 'create_date'
|
|
99
|
+
},
|
|
100
|
+
updateDate: {
|
|
101
|
+
type: DataTypes.DATE,
|
|
102
|
+
allowNull: false,
|
|
103
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
104
|
+
field: 'update_date'
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
sequelize,
|
|
108
|
+
tableName: 'canon_label',
|
|
109
|
+
schema: 'eb',
|
|
110
|
+
timestamps: false,
|
|
111
|
+
indexes: [
|
|
112
|
+
{
|
|
113
|
+
name: "label_name_idx",
|
|
114
|
+
unique: true,
|
|
115
|
+
fields: [
|
|
116
|
+
{ name: "name" },
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "label_pkey",
|
|
121
|
+
unique: true,
|
|
122
|
+
fields: [
|
|
123
|
+
{ name: "id" },
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonLabel, CanonLabelId } from './CanonLabel';
|
|
4
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
5
|
+
|
|
6
|
+
export interface CanonLabelExternalReferenceRelationAttributes {
|
|
7
|
+
canonLabelId: string;
|
|
8
|
+
externalReferenceId: string;
|
|
9
|
+
url: string;
|
|
10
|
+
createDate: Date;
|
|
11
|
+
updateDate: Date;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type CanonLabelExternalReferenceRelationPk = "canonLabelId" | "externalReferenceId";
|
|
15
|
+
export type CanonLabelExternalReferenceRelationId = CanonLabelExternalReferenceRelation[CanonLabelExternalReferenceRelationPk];
|
|
16
|
+
export type CanonLabelExternalReferenceRelationOptionalAttributes = "createDate" | "updateDate";
|
|
17
|
+
export type CanonLabelExternalReferenceRelationCreationAttributes = Optional<CanonLabelExternalReferenceRelationAttributes, CanonLabelExternalReferenceRelationOptionalAttributes>;
|
|
18
|
+
|
|
19
|
+
export class CanonLabelExternalReferenceRelation extends Model<CanonLabelExternalReferenceRelationAttributes, CanonLabelExternalReferenceRelationCreationAttributes> implements CanonLabelExternalReferenceRelationAttributes {
|
|
20
|
+
canonLabelId!: string;
|
|
21
|
+
externalReferenceId!: string;
|
|
22
|
+
url!: string;
|
|
23
|
+
createDate!: Date;
|
|
24
|
+
updateDate!: Date;
|
|
25
|
+
|
|
26
|
+
// CanonLabelExternalReferenceRelation belongsTo CanonLabel via canonLabelId
|
|
27
|
+
canonLabel!: CanonLabel;
|
|
28
|
+
getCanonLabel!: Sequelize.BelongsToGetAssociationMixin<CanonLabel>;
|
|
29
|
+
setCanonLabel!: Sequelize.BelongsToSetAssociationMixin<CanonLabel, CanonLabelId>;
|
|
30
|
+
createCanonLabel!: Sequelize.BelongsToCreateAssociationMixin<CanonLabel>;
|
|
31
|
+
// CanonLabelExternalReferenceRelation belongsTo ExternalReference via externalReferenceId
|
|
32
|
+
externalReference!: ExternalReference;
|
|
33
|
+
getExternalReference!: Sequelize.BelongsToGetAssociationMixin<ExternalReference>;
|
|
34
|
+
setExternalReference!: Sequelize.BelongsToSetAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
35
|
+
createExternalReference!: Sequelize.BelongsToCreateAssociationMixin<ExternalReference>;
|
|
36
|
+
|
|
37
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonLabelExternalReferenceRelation {
|
|
38
|
+
return CanonLabelExternalReferenceRelation.init({
|
|
39
|
+
canonLabelId: {
|
|
40
|
+
type: DataTypes.UUID,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
primaryKey: true,
|
|
43
|
+
references: {
|
|
44
|
+
model: 'canon_label',
|
|
45
|
+
key: 'id'
|
|
46
|
+
},
|
|
47
|
+
field: 'canon_label_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_label_external_reference_relation',
|
|
78
|
+
schema: 'eb',
|
|
79
|
+
timestamps: false,
|
|
80
|
+
indexes: [
|
|
81
|
+
{
|
|
82
|
+
name: "canon_label_external_reference_relation_pk",
|
|
83
|
+
unique: true,
|
|
84
|
+
fields: [
|
|
85
|
+
{ name: "canon_label_id" },
|
|
86
|
+
{ name: "external_reference_id" },
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|