@earbug/db-models 0.0.62 → 0.0.63

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.
Files changed (128) hide show
  1. package/.dockerignore +10 -0
  2. package/.github/workflows/publish.yaml +303 -0
  3. package/.nvmrc +1 -0
  4. package/Dockerfile.generate +19 -0
  5. package/model_options.json +3 -0
  6. package/models/AccessControlPreference.ts +53 -0
  7. package/models/AffinityRelationshipType.ts +96 -0
  8. package/models/AffinityTier.ts +131 -0
  9. package/models/AppUser.ts +577 -0
  10. package/models/AppUserDevice.ts +101 -0
  11. package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
  12. package/models/AppUserFollowRelation.ts +128 -0
  13. package/models/AppUserPlatformRelation.ts +150 -0
  14. package/models/CanonAlbum.ts +229 -0
  15. package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
  16. package/models/CanonAlbumGenreRelation.ts +86 -0
  17. package/models/CanonAlbumLabelRelation.ts +86 -0
  18. package/models/CanonAlbumTrackRelation.ts +92 -0
  19. package/models/CanonArtist.ts +356 -0
  20. package/models/CanonArtistAlbumRelation.ts +92 -0
  21. package/models/CanonArtistExternalReferenceRelation.ts +92 -0
  22. package/models/CanonArtistGenreRelation.ts +86 -0
  23. package/models/CanonArtistMemberRelation.ts +86 -0
  24. package/models/CanonArtistTrackRelation.ts +92 -0
  25. package/models/CanonGenre.ts +273 -0
  26. package/models/CanonGenreExternalReferenceRelation.ts +92 -0
  27. package/models/CanonLabel.ts +129 -0
  28. package/models/CanonLabelExternalReferenceRelation.ts +92 -0
  29. package/models/CanonMember.ts +130 -0
  30. package/models/CanonMemberExternalReferenceRelation.ts +99 -0
  31. package/models/CanonToPlatformAlbumRelation.ts +92 -0
  32. package/models/CanonToPlatformArtistRelation.ts +92 -0
  33. package/models/CanonToPlatformGenreRelation.ts +86 -0
  34. package/models/CanonToPlatformTrackRelation.ts +92 -0
  35. package/models/CanonTrack.ts +232 -0
  36. package/models/ConfigParam.ts +62 -0
  37. package/models/ExternalReference.ts +201 -0
  38. package/models/FeedConfig.ts +65 -0
  39. package/models/FeedContentType.ts +124 -0
  40. package/models/GuestUser.ts +137 -0
  41. package/models/JukeboxAccessType.ts +60 -0
  42. package/models/JukeboxCanonGenreRelation.ts +108 -0
  43. package/models/JukeboxInvite.ts +125 -0
  44. package/models/JukeboxQueueEntry.ts +247 -0
  45. package/models/JukeboxQueueMode.ts +60 -0
  46. package/models/JukeboxSession.ts +334 -0
  47. package/models/JukeboxSessionArtistAffinity.ts +136 -0
  48. package/models/JukeboxSessionGenreAffinity.ts +136 -0
  49. package/models/JukeboxStatus.ts +58 -0
  50. package/models/JukeboxTerminationCondition.ts +60 -0
  51. package/models/JukeboxType.ts +60 -0
  52. package/models/JukeboxUser.ts +182 -0
  53. package/models/JukeboxUserType.ts +58 -0
  54. package/models/KnexMigrations.ts +60 -0
  55. package/models/KnexMigrationsLock.ts +48 -0
  56. package/models/MerchItem.ts +198 -0
  57. package/models/MerchOrchestration.ts +130 -0
  58. package/models/MerchPlatform.ts +95 -0
  59. package/models/MerchType.ts +89 -0
  60. package/models/MetricsDaily.ts +79 -0
  61. package/models/MetricsEvent.ts +124 -0
  62. package/models/NewsArticle.ts +177 -0
  63. package/models/NewsPlatform.ts +76 -0
  64. package/models/NewsSite.ts +75 -0
  65. package/models/Notification.ts +214 -0
  66. package/models/NotificationType.ts +66 -0
  67. package/models/PauseStatusType.ts +58 -0
  68. package/models/Platform.ts +189 -0
  69. package/models/PlatformAlbum.ts +398 -0
  70. package/models/PlatformAlbumGenreRelation.ts +86 -0
  71. package/models/PlatformAlbumTrackRelation.ts +92 -0
  72. package/models/PlatformArtist.ts +358 -0
  73. package/models/PlatformArtistAlbumRelation.ts +92 -0
  74. package/models/PlatformArtistGenreRelation.ts +86 -0
  75. package/models/PlatformArtistTrackRelation.ts +92 -0
  76. package/models/PlatformGenre.ts +194 -0
  77. package/models/PlatformTrack.ts +339 -0
  78. package/models/PlatformTrackGenreRelation.ts +86 -0
  79. package/models/PlatformUserAlbum.ts +152 -0
  80. package/models/PlatformUserAlbumTrack.ts +138 -0
  81. package/models/PlatformUserPlaylist.ts +260 -0
  82. package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
  83. package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
  84. package/models/PlatformUserPlaylistTrack.ts +162 -0
  85. package/models/PlaybackStatus.ts +47 -0
  86. package/models/PlaybackStatusType.ts +58 -0
  87. package/models/RadioShow.ts +209 -0
  88. package/models/RadioShowGenres.ts +107 -0
  89. package/models/RadioShowMedia.ts +181 -0
  90. package/models/RadioShowPlacement.ts +115 -0
  91. package/models/RadioShowPublishRequests.ts +86 -0
  92. package/models/State.ts +86 -0
  93. package/models/TrackDeletionReason.ts +58 -0
  94. package/models/UnmatchedAlbum.ts +66 -0
  95. package/models/UnmatchedArtist.ts +81 -0
  96. package/models/UserAbuseReports.ts +232 -0
  97. package/models/UserAffinity.ts +117 -0
  98. package/models/UserArtistAffinity.ts +136 -0
  99. package/models/UserBookmarks.ts +235 -0
  100. package/models/UserComments.ts +271 -0
  101. package/models/UserContacts.ts +155 -0
  102. package/models/UserEngagementFactor.ts +109 -0
  103. package/models/UserGenreAffinity.ts +136 -0
  104. package/models/UserLikes.ts +235 -0
  105. package/models/UserMessages.ts +189 -0
  106. package/models/Versus.ts +438 -0
  107. package/models/VersusAccessType.ts +66 -0
  108. package/models/VersusCoCreator.ts +111 -0
  109. package/models/VersusCreatorScope.ts +66 -0
  110. package/models/VersusEndMode.ts +66 -0
  111. package/models/VersusEndTimerDuration.ts +81 -0
  112. package/models/VersusEndVoteThreshold.ts +67 -0
  113. package/models/VersusEntityKind.ts +79 -0
  114. package/models/VersusOption.ts +258 -0
  115. package/models/VersusPublishIssue.ts +146 -0
  116. package/models/VersusQuestion.ts +123 -0
  117. package/models/VersusQuestionVariableType.ts +66 -0
  118. package/models/VersusVote.ts +99 -0
  119. package/models/VersusVotingListType.ts +66 -0
  120. package/models/VersusVotingMode.ts +66 -0
  121. package/models/index.ts +3 -0
  122. package/models/init-models.ts +1259 -0
  123. package/models/initDb.ts +72 -0
  124. package/models/rdsCaBundle.ts +5 -0
  125. package/package.json +2 -5
  126. package/scripts/generate-and-upload.mjs +123 -0
  127. package/scripts/update-rds-ca-bundle.mjs +44 -0
  128. package/tsconfig.json +52 -0
@@ -0,0 +1,358 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonArtist, CanonArtistId } from './CanonArtist';
4
+ import type { CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId } from './CanonArtistExternalReferenceRelation';
5
+ import type { CanonArtistGenreRelation, CanonArtistGenreRelationId } from './CanonArtistGenreRelation';
6
+ import type { CanonArtistMemberRelation, CanonArtistMemberRelationId } from './CanonArtistMemberRelation';
7
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
8
+ import type { CanonMember, CanonMemberId } from './CanonMember';
9
+ import type { CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId } from './CanonToPlatformArtistRelation';
10
+ import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
11
+ import type { Platform, PlatformId } from './Platform';
12
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
13
+ import type { PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId } from './PlatformArtistAlbumRelation';
14
+ import type { PlatformArtistGenreRelation, PlatformArtistGenreRelationId } from './PlatformArtistGenreRelation';
15
+ import type { PlatformArtistTrackRelation, PlatformArtistTrackRelationId } from './PlatformArtistTrackRelation';
16
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
17
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
18
+ import type { Versus, VersusId } from './Versus';
19
+ import type { VersusOption, VersusOptionId } from './VersusOption';
20
+ import type { VersusPublishIssue, VersusPublishIssueId } from './VersusPublishIssue';
21
+
22
+ export interface PlatformArtistAttributes {
23
+ id: string;
24
+ externalArtistId: string;
25
+ platformId: number;
26
+ name: string;
27
+ asciiName: string;
28
+ externalUri?: string;
29
+ createDate: Date;
30
+ updateDate: Date;
31
+ genres?: string[];
32
+ lastHarvestDate?: Date;
33
+ lastHarvestLog?: string;
34
+ images?: object;
35
+ }
36
+
37
+ export type PlatformArtistPk = "id";
38
+ export type PlatformArtistId = PlatformArtist[PlatformArtistPk];
39
+ export type PlatformArtistOptionalAttributes = "id" | "externalUri" | "createDate" | "updateDate" | "genres" | "lastHarvestDate" | "lastHarvestLog" | "images";
40
+ export type PlatformArtistCreationAttributes = Optional<PlatformArtistAttributes, PlatformArtistOptionalAttributes>;
41
+
42
+ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArtistCreationAttributes> implements PlatformArtistAttributes {
43
+ id!: string;
44
+ externalArtistId!: string;
45
+ platformId!: number;
46
+ name!: string;
47
+ asciiName!: string;
48
+ externalUri?: string;
49
+ createDate!: Date;
50
+ updateDate!: Date;
51
+ genres?: string[];
52
+ lastHarvestDate?: Date;
53
+ lastHarvestLog?: string;
54
+ images?: object;
55
+
56
+ // PlatformArtist belongsTo Platform via platformId
57
+ platform!: Platform;
58
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
59
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
60
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
61
+ // PlatformArtist belongsToMany CanonArtist via platformArtistId and canonArtistId
62
+ canonArtistIdCanonArtistCanonToPlatformArtistRelations!: CanonArtist[];
63
+ getCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
64
+ setCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonArtist, CanonArtistId>;
65
+ addCanonArtistIdCanonArtistCanonToPlatformArtistRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonArtist, CanonArtistId>;
66
+ addCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonArtist, CanonArtistId>;
67
+ createCanonArtistIdCanonArtistCanonToPlatformArtistRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonArtist>;
68
+ removeCanonArtistIdCanonArtistCanonToPlatformArtistRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonArtist, CanonArtistId>;
69
+ removeCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonArtist, CanonArtistId>;
70
+ hasCanonArtistIdCanonArtistCanonToPlatformArtistRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonArtist, CanonArtistId>;
71
+ hasCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonArtist, CanonArtistId>;
72
+ countCanonArtistIdCanonArtistCanonToPlatformArtistRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
73
+ // PlatformArtist hasMany CanonArtistExternalReferenceRelation via canonArtistId
74
+ canonArtistExternalReferenceRelations!: CanonArtistExternalReferenceRelation[];
75
+ getCanonArtistExternalReferenceRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistExternalReferenceRelation>;
76
+ setCanonArtistExternalReferenceRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
77
+ addCanonArtistExternalReferenceRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
78
+ addCanonArtistExternalReferenceRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
79
+ createCanonArtistExternalReferenceRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistExternalReferenceRelation>;
80
+ removeCanonArtistExternalReferenceRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
81
+ removeCanonArtistExternalReferenceRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
82
+ hasCanonArtistExternalReferenceRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
83
+ hasCanonArtistExternalReferenceRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistExternalReferenceRelation, CanonArtistExternalReferenceRelationId>;
84
+ countCanonArtistExternalReferenceRelations!: Sequelize.HasManyCountAssociationsMixin;
85
+ // PlatformArtist hasMany CanonArtistGenreRelation via canonArtistId
86
+ canonArtistGenreRelations!: CanonArtistGenreRelation[];
87
+ getCanonArtistGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistGenreRelation>;
88
+ setCanonArtistGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
89
+ addCanonArtistGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
90
+ addCanonArtistGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
91
+ createCanonArtistGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistGenreRelation>;
92
+ removeCanonArtistGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
93
+ removeCanonArtistGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
94
+ hasCanonArtistGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
95
+ hasCanonArtistGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistGenreRelation, CanonArtistGenreRelationId>;
96
+ countCanonArtistGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
97
+ // PlatformArtist hasMany CanonArtistMemberRelation via canonArtistId
98
+ canonArtistMemberRelations!: CanonArtistMemberRelation[];
99
+ getCanonArtistMemberRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistMemberRelation>;
100
+ setCanonArtistMemberRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
101
+ addCanonArtistMemberRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
102
+ addCanonArtistMemberRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
103
+ createCanonArtistMemberRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistMemberRelation>;
104
+ removeCanonArtistMemberRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
105
+ removeCanonArtistMemberRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
106
+ hasCanonArtistMemberRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
107
+ hasCanonArtistMemberRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistMemberRelation, CanonArtistMemberRelationId>;
108
+ countCanonArtistMemberRelations!: Sequelize.HasManyCountAssociationsMixin;
109
+ // PlatformArtist belongsToMany CanonGenre via canonArtistId and canonGenreId
110
+ canonGenreIdCanonGenreCanonArtistGenreRelations!: CanonGenre[];
111
+ getCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonGenre>;
112
+ setCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonGenre, CanonGenreId>;
113
+ addCanonGenreIdCanonGenreCanonArtistGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonGenre, CanonGenreId>;
114
+ addCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonGenre, CanonGenreId>;
115
+ createCanonGenreIdCanonGenreCanonArtistGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonGenre>;
116
+ removeCanonGenreIdCanonGenreCanonArtistGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonGenre, CanonGenreId>;
117
+ removeCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonGenre, CanonGenreId>;
118
+ hasCanonGenreIdCanonGenreCanonArtistGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonGenre, CanonGenreId>;
119
+ hasCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonGenre, CanonGenreId>;
120
+ countCanonGenreIdCanonGenreCanonArtistGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
121
+ // PlatformArtist belongsToMany CanonMember via canonArtistId and canonMemberId
122
+ canonMemberIdCanonMembers!: CanonMember[];
123
+ getCanonMemberIdCanonMembers!: Sequelize.BelongsToManyGetAssociationsMixin<CanonMember>;
124
+ setCanonMemberIdCanonMembers!: Sequelize.BelongsToManySetAssociationsMixin<CanonMember, CanonMemberId>;
125
+ addCanonMemberIdCanonMember!: Sequelize.BelongsToManyAddAssociationMixin<CanonMember, CanonMemberId>;
126
+ addCanonMemberIdCanonMembers!: Sequelize.BelongsToManyAddAssociationsMixin<CanonMember, CanonMemberId>;
127
+ createCanonMemberIdCanonMember!: Sequelize.BelongsToManyCreateAssociationMixin<CanonMember>;
128
+ removeCanonMemberIdCanonMember!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonMember, CanonMemberId>;
129
+ removeCanonMemberIdCanonMembers!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonMember, CanonMemberId>;
130
+ hasCanonMemberIdCanonMember!: Sequelize.BelongsToManyHasAssociationMixin<CanonMember, CanonMemberId>;
131
+ hasCanonMemberIdCanonMembers!: Sequelize.BelongsToManyHasAssociationsMixin<CanonMember, CanonMemberId>;
132
+ countCanonMemberIdCanonMembers!: Sequelize.BelongsToManyCountAssociationsMixin;
133
+ // PlatformArtist hasMany CanonToPlatformArtistRelation via platformArtistId
134
+ canonToPlatformArtistRelations!: CanonToPlatformArtistRelation[];
135
+ getCanonToPlatformArtistRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformArtistRelation>;
136
+ setCanonToPlatformArtistRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
137
+ addCanonToPlatformArtistRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
138
+ addCanonToPlatformArtistRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
139
+ createCanonToPlatformArtistRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformArtistRelation>;
140
+ removeCanonToPlatformArtistRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
141
+ removeCanonToPlatformArtistRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
142
+ hasCanonToPlatformArtistRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
143
+ hasCanonToPlatformArtistRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformArtistRelation, CanonToPlatformArtistRelationId>;
144
+ countCanonToPlatformArtistRelations!: Sequelize.HasManyCountAssociationsMixin;
145
+ // PlatformArtist belongsToMany ExternalReference via canonArtistId and externalReferenceId
146
+ externalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: ExternalReference[];
147
+ getExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
148
+ setExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManySetAssociationsMixin<ExternalReference, ExternalReferenceId>;
149
+ addExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelation!: Sequelize.BelongsToManyAddAssociationMixin<ExternalReference, ExternalReferenceId>;
150
+ addExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManyAddAssociationsMixin<ExternalReference, ExternalReferenceId>;
151
+ createExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelation!: Sequelize.BelongsToManyCreateAssociationMixin<ExternalReference>;
152
+ removeExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<ExternalReference, ExternalReferenceId>;
153
+ removeExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<ExternalReference, ExternalReferenceId>;
154
+ hasExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelation!: Sequelize.BelongsToManyHasAssociationMixin<ExternalReference, ExternalReferenceId>;
155
+ hasExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManyHasAssociationsMixin<ExternalReference, ExternalReferenceId>;
156
+ countExternalReferenceIdExternalReferenceCanonArtistExternalReferenceRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
157
+ // PlatformArtist belongsToMany PlatformAlbum via platformArtistId and platformAlbumId
158
+ platformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: PlatformAlbum[];
159
+ getPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
160
+ setPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
161
+ addPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
162
+ addPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
163
+ createPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
164
+ removePlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
165
+ removePlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
166
+ hasPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
167
+ hasPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
168
+ countPlatformAlbumIdPlatformAlbumPlatformArtistAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
169
+ // PlatformArtist hasMany PlatformArtistAlbumRelation via platformArtistId
170
+ platformArtistAlbumRelations!: PlatformArtistAlbumRelation[];
171
+ getPlatformArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistAlbumRelation>;
172
+ setPlatformArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
173
+ addPlatformArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
174
+ addPlatformArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
175
+ createPlatformArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistAlbumRelation>;
176
+ removePlatformArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
177
+ removePlatformArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
178
+ hasPlatformArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
179
+ hasPlatformArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
180
+ countPlatformArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
181
+ // PlatformArtist hasMany PlatformArtistGenreRelation via platformArtistId
182
+ platformArtistGenreRelations!: PlatformArtistGenreRelation[];
183
+ getPlatformArtistGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistGenreRelation>;
184
+ setPlatformArtistGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
185
+ addPlatformArtistGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
186
+ addPlatformArtistGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
187
+ createPlatformArtistGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistGenreRelation>;
188
+ removePlatformArtistGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
189
+ removePlatformArtistGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
190
+ hasPlatformArtistGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
191
+ hasPlatformArtistGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
192
+ countPlatformArtistGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
193
+ // PlatformArtist hasMany PlatformArtistTrackRelation via platformArtistId
194
+ platformArtistTrackRelations!: PlatformArtistTrackRelation[];
195
+ getPlatformArtistTrackRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistTrackRelation>;
196
+ setPlatformArtistTrackRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
197
+ addPlatformArtistTrackRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
198
+ addPlatformArtistTrackRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
199
+ createPlatformArtistTrackRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistTrackRelation>;
200
+ removePlatformArtistTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
201
+ removePlatformArtistTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
202
+ hasPlatformArtistTrackRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
203
+ hasPlatformArtistTrackRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
204
+ countPlatformArtistTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
205
+ // PlatformArtist belongsToMany PlatformGenre via platformArtistId and platformGenreId
206
+ platformGenreIdPlatformGenrePlatformArtistGenreRelations!: PlatformGenre[];
207
+ getPlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformGenre>;
208
+ setPlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
209
+ addPlatformGenreIdPlatformGenrePlatformArtistGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
210
+ addPlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
211
+ createPlatformGenreIdPlatformGenrePlatformArtistGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformGenre>;
212
+ removePlatformGenreIdPlatformGenrePlatformArtistGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
213
+ removePlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
214
+ hasPlatformGenreIdPlatformGenrePlatformArtistGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
215
+ hasPlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
216
+ countPlatformGenreIdPlatformGenrePlatformArtistGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
217
+ // PlatformArtist belongsToMany PlatformTrack via platformArtistId and platformTrackId
218
+ platformTrackIdPlatformTrackPlatformArtistTrackRelations!: PlatformTrack[];
219
+ getPlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
220
+ setPlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
221
+ addPlatformTrackIdPlatformTrackPlatformArtistTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
222
+ addPlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
223
+ createPlatformTrackIdPlatformTrackPlatformArtistTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformTrack>;
224
+ removePlatformTrackIdPlatformTrackPlatformArtistTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
225
+ removePlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
226
+ hasPlatformTrackIdPlatformTrackPlatformArtistTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
227
+ hasPlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
228
+ countPlatformTrackIdPlatformTrackPlatformArtistTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
229
+ // PlatformArtist hasMany Versus via platformArtistId
230
+ versus!: Versus[];
231
+ getVersus!: Sequelize.HasManyGetAssociationsMixin<Versus>;
232
+ setVersus!: Sequelize.HasManySetAssociationsMixin<Versus, VersusId>;
233
+ addVersu!: Sequelize.HasManyAddAssociationMixin<Versus, VersusId>;
234
+ addVersus!: Sequelize.HasManyAddAssociationsMixin<Versus, VersusId>;
235
+ createVersu!: Sequelize.HasManyCreateAssociationMixin<Versus>;
236
+ removeVersu!: Sequelize.HasManyRemoveAssociationMixin<Versus, VersusId>;
237
+ removeVersus!: Sequelize.HasManyRemoveAssociationsMixin<Versus, VersusId>;
238
+ hasVersu!: Sequelize.HasManyHasAssociationMixin<Versus, VersusId>;
239
+ hasVersus!: Sequelize.HasManyHasAssociationsMixin<Versus, VersusId>;
240
+ countVersus!: Sequelize.HasManyCountAssociationsMixin;
241
+ // PlatformArtist hasMany VersusOption via platformArtistId
242
+ versusOptions!: VersusOption[];
243
+ getVersusOptions!: Sequelize.HasManyGetAssociationsMixin<VersusOption>;
244
+ setVersusOptions!: Sequelize.HasManySetAssociationsMixin<VersusOption, VersusOptionId>;
245
+ addVersusOption!: Sequelize.HasManyAddAssociationMixin<VersusOption, VersusOptionId>;
246
+ addVersusOptions!: Sequelize.HasManyAddAssociationsMixin<VersusOption, VersusOptionId>;
247
+ createVersusOption!: Sequelize.HasManyCreateAssociationMixin<VersusOption>;
248
+ removeVersusOption!: Sequelize.HasManyRemoveAssociationMixin<VersusOption, VersusOptionId>;
249
+ removeVersusOptions!: Sequelize.HasManyRemoveAssociationsMixin<VersusOption, VersusOptionId>;
250
+ hasVersusOption!: Sequelize.HasManyHasAssociationMixin<VersusOption, VersusOptionId>;
251
+ hasVersusOptions!: Sequelize.HasManyHasAssociationsMixin<VersusOption, VersusOptionId>;
252
+ countVersusOptions!: Sequelize.HasManyCountAssociationsMixin;
253
+ // PlatformArtist hasMany VersusPublishIssue via platformArtistId
254
+ versusPublishIssues!: VersusPublishIssue[];
255
+ getVersusPublishIssues!: Sequelize.HasManyGetAssociationsMixin<VersusPublishIssue>;
256
+ setVersusPublishIssues!: Sequelize.HasManySetAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
257
+ addVersusPublishIssue!: Sequelize.HasManyAddAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
258
+ addVersusPublishIssues!: Sequelize.HasManyAddAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
259
+ createVersusPublishIssue!: Sequelize.HasManyCreateAssociationMixin<VersusPublishIssue>;
260
+ removeVersusPublishIssue!: Sequelize.HasManyRemoveAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
261
+ removeVersusPublishIssues!: Sequelize.HasManyRemoveAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
262
+ hasVersusPublishIssue!: Sequelize.HasManyHasAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
263
+ hasVersusPublishIssues!: Sequelize.HasManyHasAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
264
+ countVersusPublishIssues!: Sequelize.HasManyCountAssociationsMixin;
265
+
266
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtist {
267
+ return PlatformArtist.init({
268
+ id: {
269
+ type: DataTypes.UUID,
270
+ allowNull: false,
271
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
272
+ primaryKey: true
273
+ },
274
+ externalArtistId: {
275
+ type: DataTypes.TEXT,
276
+ allowNull: false,
277
+ unique: "uk_platform_id_external_artist_id",
278
+ field: 'external_artist_id'
279
+ },
280
+ platformId: {
281
+ type: DataTypes.SMALLINT,
282
+ allowNull: false,
283
+ references: {
284
+ model: 'platform',
285
+ key: 'id'
286
+ },
287
+ unique: "uk_platform_id_external_artist_id",
288
+ field: 'platform_id'
289
+ },
290
+ name: {
291
+ type: DataTypes.TEXT,
292
+ allowNull: false
293
+ },
294
+ asciiName: {
295
+ type: DataTypes.TEXT,
296
+ allowNull: false,
297
+ field: 'ascii_name'
298
+ },
299
+ externalUri: {
300
+ type: DataTypes.TEXT,
301
+ allowNull: true,
302
+ field: 'external_uri'
303
+ },
304
+ createDate: {
305
+ type: DataTypes.DATE,
306
+ allowNull: false,
307
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
308
+ field: 'create_date'
309
+ },
310
+ updateDate: {
311
+ type: DataTypes.DATE,
312
+ allowNull: false,
313
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
314
+ field: 'update_date'
315
+ },
316
+ genres: {
317
+ type: DataTypes.ARRAY(DataTypes.TEXT),
318
+ allowNull: true
319
+ },
320
+ lastHarvestDate: {
321
+ type: DataTypes.DATE,
322
+ allowNull: true,
323
+ field: 'last_harvest_date'
324
+ },
325
+ lastHarvestLog: {
326
+ type: DataTypes.TEXT,
327
+ allowNull: true,
328
+ field: 'last_harvest_log'
329
+ },
330
+ images: {
331
+ type: DataTypes.JSONB,
332
+ allowNull: true
333
+ }
334
+ }, {
335
+ sequelize,
336
+ tableName: 'platform_artist',
337
+ schema: 'eb',
338
+ timestamps: false,
339
+ indexes: [
340
+ {
341
+ name: "platform_artist_pkey",
342
+ unique: true,
343
+ fields: [
344
+ { name: "id" },
345
+ ]
346
+ },
347
+ {
348
+ name: "uk_platform_id_external_artist_id",
349
+ unique: true,
350
+ fields: [
351
+ { name: "platform_id" },
352
+ { name: "external_artist_id" },
353
+ ]
354
+ },
355
+ ]
356
+ });
357
+ }
358
+ }
@@ -0,0 +1,92 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
5
+
6
+ export interface PlatformArtistAlbumRelationAttributes {
7
+ platformArtistId: string;
8
+ platformAlbumId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformArtistAlbumRelationPk = "platformArtistId" | "platformAlbumId";
14
+ export type PlatformArtistAlbumRelationId = PlatformArtistAlbumRelation[PlatformArtistAlbumRelationPk];
15
+ export type PlatformArtistAlbumRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformArtistAlbumRelationCreationAttributes = Optional<PlatformArtistAlbumRelationAttributes, PlatformArtistAlbumRelationOptionalAttributes>;
17
+
18
+ export class PlatformArtistAlbumRelation extends Model<PlatformArtistAlbumRelationAttributes, PlatformArtistAlbumRelationCreationAttributes> implements PlatformArtistAlbumRelationAttributes {
19
+ platformArtistId!: string;
20
+ platformAlbumId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformArtistAlbumRelation belongsTo PlatformAlbum via platformAlbumId
25
+ platformAlbum!: PlatformAlbum;
26
+ getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
27
+ setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
28
+ createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
29
+ // PlatformArtistAlbumRelation belongsTo PlatformArtist via platformArtistId
30
+ platformArtist!: PlatformArtist;
31
+ getPlatformArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
32
+ setPlatformArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
33
+ createPlatformArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
34
+
35
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtistAlbumRelation {
36
+ return PlatformArtistAlbumRelation.init({
37
+ platformArtistId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_artist',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_artist_id'
46
+ },
47
+ platformAlbumId: {
48
+ type: DataTypes.UUID,
49
+ allowNull: false,
50
+ primaryKey: true,
51
+ references: {
52
+ model: 'platform_album',
53
+ key: 'id'
54
+ },
55
+ field: 'platform_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: 'platform_artist_album_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "idx_platform_artist_album_album",
77
+ fields: [
78
+ { name: "platform_album_id" },
79
+ ]
80
+ },
81
+ {
82
+ name: "platform_artist_album_relation_pkey",
83
+ unique: true,
84
+ fields: [
85
+ { name: "platform_artist_id" },
86
+ { name: "platform_album_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 { PlatformArtist, PlatformArtistId } from './PlatformArtist';
4
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
5
+
6
+ export interface PlatformArtistGenreRelationAttributes {
7
+ platformArtistId: string;
8
+ platformGenreId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformArtistGenreRelationPk = "platformArtistId" | "platformGenreId";
14
+ export type PlatformArtistGenreRelationId = PlatformArtistGenreRelation[PlatformArtistGenreRelationPk];
15
+ export type PlatformArtistGenreRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformArtistGenreRelationCreationAttributes = Optional<PlatformArtistGenreRelationAttributes, PlatformArtistGenreRelationOptionalAttributes>;
17
+
18
+ export class PlatformArtistGenreRelation extends Model<PlatformArtistGenreRelationAttributes, PlatformArtistGenreRelationCreationAttributes> implements PlatformArtistGenreRelationAttributes {
19
+ platformArtistId!: string;
20
+ platformGenreId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformArtistGenreRelation belongsTo PlatformArtist via platformArtistId
25
+ platformArtist!: PlatformArtist;
26
+ getPlatformArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
27
+ setPlatformArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
28
+ createPlatformArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
29
+ // PlatformArtistGenreRelation belongsTo PlatformGenre via platformGenreId
30
+ platformGenre!: PlatformGenre;
31
+ getPlatformGenre!: Sequelize.BelongsToGetAssociationMixin<PlatformGenre>;
32
+ setPlatformGenre!: Sequelize.BelongsToSetAssociationMixin<PlatformGenre, PlatformGenreId>;
33
+ createPlatformGenre!: Sequelize.BelongsToCreateAssociationMixin<PlatformGenre>;
34
+
35
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtistGenreRelation {
36
+ return PlatformArtistGenreRelation.init({
37
+ platformArtistId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_artist',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_artist_id'
46
+ },
47
+ platformGenreId: {
48
+ type: DataTypes.UUID,
49
+ allowNull: false,
50
+ primaryKey: true,
51
+ references: {
52
+ model: 'platform_genre',
53
+ key: 'id'
54
+ },
55
+ field: 'platform_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: 'platform_artist_genre_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "platform_artist_genre_relation_pkey",
77
+ unique: true,
78
+ fields: [
79
+ { name: "platform_artist_id" },
80
+ { name: "platform_genre_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 { PlatformArtist, PlatformArtistId } from './PlatformArtist';
4
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
+
6
+ export interface PlatformArtistTrackRelationAttributes {
7
+ platformArtistId: string;
8
+ platformTrackId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformArtistTrackRelationPk = "platformArtistId" | "platformTrackId";
14
+ export type PlatformArtistTrackRelationId = PlatformArtistTrackRelation[PlatformArtistTrackRelationPk];
15
+ export type PlatformArtistTrackRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformArtistTrackRelationCreationAttributes = Optional<PlatformArtistTrackRelationAttributes, PlatformArtistTrackRelationOptionalAttributes>;
17
+
18
+ export class PlatformArtistTrackRelation extends Model<PlatformArtistTrackRelationAttributes, PlatformArtistTrackRelationCreationAttributes> implements PlatformArtistTrackRelationAttributes {
19
+ platformArtistId!: string;
20
+ platformTrackId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformArtistTrackRelation belongsTo PlatformArtist via platformArtistId
25
+ platformArtist!: PlatformArtist;
26
+ getPlatformArtist!: Sequelize.BelongsToGetAssociationMixin<PlatformArtist>;
27
+ setPlatformArtist!: Sequelize.BelongsToSetAssociationMixin<PlatformArtist, PlatformArtistId>;
28
+ createPlatformArtist!: Sequelize.BelongsToCreateAssociationMixin<PlatformArtist>;
29
+ // PlatformArtistTrackRelation belongsTo PlatformTrack via platformTrackId
30
+ platformTrack!: PlatformTrack;
31
+ getPlatformTrack!: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
32
+ setPlatformTrack!: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
33
+ createPlatformTrack!: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
34
+
35
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtistTrackRelation {
36
+ return PlatformArtistTrackRelation.init({
37
+ platformArtistId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_artist',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_artist_id'
46
+ },
47
+ platformTrackId: {
48
+ type: DataTypes.UUID,
49
+ allowNull: false,
50
+ primaryKey: true,
51
+ references: {
52
+ model: 'platform_track',
53
+ key: 'id'
54
+ },
55
+ field: 'platform_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: 'platform_artist_track_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "idx_platform_artist_track_track",
77
+ fields: [
78
+ { name: "platform_track_id" },
79
+ ]
80
+ },
81
+ {
82
+ name: "platform_artist_track_relation_pkey",
83
+ unique: true,
84
+ fields: [
85
+ { name: "platform_artist_id" },
86
+ { name: "platform_track_id" },
87
+ ]
88
+ },
89
+ ]
90
+ });
91
+ }
92
+ }