@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,398 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
4
+ import type { CanonAlbumGenreRelation, CanonAlbumGenreRelationId } from './CanonAlbumGenreRelation';
5
+ import type { CanonAlbumLabelRelation, CanonAlbumLabelRelationId } from './CanonAlbumLabelRelation';
6
+ import type { CanonArtist, CanonArtistId } from './CanonArtist';
7
+ import type { CanonArtistAlbumRelation, CanonArtistAlbumRelationId } from './CanonArtistAlbumRelation';
8
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
9
+ import type { CanonLabel, CanonLabelId } from './CanonLabel';
10
+ import type { CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId } from './CanonToPlatformAlbumRelation';
11
+ import type { Platform, PlatformId } from './Platform';
12
+ import type { PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId } from './PlatformAlbumGenreRelation';
13
+ import type { PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId } from './PlatformAlbumTrackRelation';
14
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
15
+ import type { PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId } from './PlatformArtistAlbumRelation';
16
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
17
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
18
+ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
19
+ import type { UnmatchedAlbum, UnmatchedAlbumId } from './UnmatchedAlbum';
20
+ import type { Versus, VersusId } from './Versus';
21
+ import type { VersusOption, VersusOptionId } from './VersusOption';
22
+ import type { VersusPublishIssue, VersusPublishIssueId } from './VersusPublishIssue';
23
+
24
+ export interface PlatformAlbumAttributes {
25
+ id: string;
26
+ platformId: number;
27
+ externalAlbumId: string;
28
+ name: string;
29
+ asciiName: string;
30
+ albumType?: string;
31
+ releaseDate?: string;
32
+ popularity?: number;
33
+ recordLabel?: string;
34
+ createDate: Date;
35
+ updateDate: Date;
36
+ images?: object;
37
+ lastHarvestDate?: Date;
38
+ lastHarvestLog?: string;
39
+ }
40
+
41
+ export type PlatformAlbumPk = "id";
42
+ export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
43
+ export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images" | "lastHarvestDate" | "lastHarvestLog";
44
+ export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
45
+
46
+ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
47
+ id!: string;
48
+ platformId!: number;
49
+ externalAlbumId!: string;
50
+ name!: string;
51
+ asciiName!: string;
52
+ albumType?: string;
53
+ releaseDate?: string;
54
+ popularity?: number;
55
+ recordLabel?: string;
56
+ createDate!: Date;
57
+ updateDate!: Date;
58
+ images?: object;
59
+ lastHarvestDate?: Date;
60
+ lastHarvestLog?: string;
61
+
62
+ // PlatformAlbum belongsTo Platform via platformId
63
+ platform!: Platform;
64
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
65
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
66
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
67
+ // PlatformAlbum belongsToMany CanonAlbum via platformAlbumId and canonAlbumId
68
+ canonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: CanonAlbum[];
69
+ getCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonAlbum>;
70
+ setCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonAlbum, CanonAlbumId>;
71
+ addCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonAlbum, CanonAlbumId>;
72
+ addCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonAlbum, CanonAlbumId>;
73
+ createCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonAlbum>;
74
+ removeCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonAlbum, CanonAlbumId>;
75
+ removeCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonAlbum, CanonAlbumId>;
76
+ hasCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonAlbum, CanonAlbumId>;
77
+ hasCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonAlbum, CanonAlbumId>;
78
+ countCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
79
+ // PlatformAlbum hasMany CanonAlbumGenreRelation via canonAlbumId
80
+ canonAlbumGenreRelations!: CanonAlbumGenreRelation[];
81
+ getCanonAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumGenreRelation>;
82
+ setCanonAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
83
+ addCanonAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
84
+ addCanonAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
85
+ createCanonAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumGenreRelation>;
86
+ removeCanonAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
87
+ removeCanonAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
88
+ hasCanonAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
89
+ hasCanonAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
90
+ countCanonAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
91
+ // PlatformAlbum hasMany CanonAlbumLabelRelation via canonAlbumId
92
+ canonAlbumLabelRelations!: CanonAlbumLabelRelation[];
93
+ getCanonAlbumLabelRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumLabelRelation>;
94
+ setCanonAlbumLabelRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
95
+ addCanonAlbumLabelRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
96
+ addCanonAlbumLabelRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
97
+ createCanonAlbumLabelRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumLabelRelation>;
98
+ removeCanonAlbumLabelRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
99
+ removeCanonAlbumLabelRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
100
+ hasCanonAlbumLabelRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
101
+ hasCanonAlbumLabelRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
102
+ countCanonAlbumLabelRelations!: Sequelize.HasManyCountAssociationsMixin;
103
+ // PlatformAlbum belongsToMany CanonArtist via canonAlbumId and canonArtistId
104
+ canonArtistIdCanonArtists!: CanonArtist[];
105
+ getCanonArtistIdCanonArtists!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
106
+ setCanonArtistIdCanonArtists!: Sequelize.BelongsToManySetAssociationsMixin<CanonArtist, CanonArtistId>;
107
+ addCanonArtistIdCanonArtist!: Sequelize.BelongsToManyAddAssociationMixin<CanonArtist, CanonArtistId>;
108
+ addCanonArtistIdCanonArtists!: Sequelize.BelongsToManyAddAssociationsMixin<CanonArtist, CanonArtistId>;
109
+ createCanonArtistIdCanonArtist!: Sequelize.BelongsToManyCreateAssociationMixin<CanonArtist>;
110
+ removeCanonArtistIdCanonArtist!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonArtist, CanonArtistId>;
111
+ removeCanonArtistIdCanonArtists!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonArtist, CanonArtistId>;
112
+ hasCanonArtistIdCanonArtist!: Sequelize.BelongsToManyHasAssociationMixin<CanonArtist, CanonArtistId>;
113
+ hasCanonArtistIdCanonArtists!: Sequelize.BelongsToManyHasAssociationsMixin<CanonArtist, CanonArtistId>;
114
+ countCanonArtistIdCanonArtists!: Sequelize.BelongsToManyCountAssociationsMixin;
115
+ // PlatformAlbum hasMany CanonArtistAlbumRelation via canonAlbumId
116
+ canonArtistAlbumRelations!: CanonArtistAlbumRelation[];
117
+ getCanonArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistAlbumRelation>;
118
+ setCanonArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
119
+ addCanonArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
120
+ addCanonArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
121
+ createCanonArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistAlbumRelation>;
122
+ removeCanonArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
123
+ removeCanonArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
124
+ hasCanonArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
125
+ hasCanonArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
126
+ countCanonArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
127
+ // PlatformAlbum belongsToMany CanonGenre via canonAlbumId and canonGenreId
128
+ canonGenreIdCanonGenres!: CanonGenre[];
129
+ getCanonGenreIdCanonGenres!: Sequelize.BelongsToManyGetAssociationsMixin<CanonGenre>;
130
+ setCanonGenreIdCanonGenres!: Sequelize.BelongsToManySetAssociationsMixin<CanonGenre, CanonGenreId>;
131
+ addCanonGenreIdCanonGenre!: Sequelize.BelongsToManyAddAssociationMixin<CanonGenre, CanonGenreId>;
132
+ addCanonGenreIdCanonGenres!: Sequelize.BelongsToManyAddAssociationsMixin<CanonGenre, CanonGenreId>;
133
+ createCanonGenreIdCanonGenre!: Sequelize.BelongsToManyCreateAssociationMixin<CanonGenre>;
134
+ removeCanonGenreIdCanonGenre!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonGenre, CanonGenreId>;
135
+ removeCanonGenreIdCanonGenres!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonGenre, CanonGenreId>;
136
+ hasCanonGenreIdCanonGenre!: Sequelize.BelongsToManyHasAssociationMixin<CanonGenre, CanonGenreId>;
137
+ hasCanonGenreIdCanonGenres!: Sequelize.BelongsToManyHasAssociationsMixin<CanonGenre, CanonGenreId>;
138
+ countCanonGenreIdCanonGenres!: Sequelize.BelongsToManyCountAssociationsMixin;
139
+ // PlatformAlbum belongsToMany CanonLabel via canonAlbumId and canonLabelId
140
+ canonLabelIdCanonLabels!: CanonLabel[];
141
+ getCanonLabelIdCanonLabels!: Sequelize.BelongsToManyGetAssociationsMixin<CanonLabel>;
142
+ setCanonLabelIdCanonLabels!: Sequelize.BelongsToManySetAssociationsMixin<CanonLabel, CanonLabelId>;
143
+ addCanonLabelIdCanonLabel!: Sequelize.BelongsToManyAddAssociationMixin<CanonLabel, CanonLabelId>;
144
+ addCanonLabelIdCanonLabels!: Sequelize.BelongsToManyAddAssociationsMixin<CanonLabel, CanonLabelId>;
145
+ createCanonLabelIdCanonLabel!: Sequelize.BelongsToManyCreateAssociationMixin<CanonLabel>;
146
+ removeCanonLabelIdCanonLabel!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonLabel, CanonLabelId>;
147
+ removeCanonLabelIdCanonLabels!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonLabel, CanonLabelId>;
148
+ hasCanonLabelIdCanonLabel!: Sequelize.BelongsToManyHasAssociationMixin<CanonLabel, CanonLabelId>;
149
+ hasCanonLabelIdCanonLabels!: Sequelize.BelongsToManyHasAssociationsMixin<CanonLabel, CanonLabelId>;
150
+ countCanonLabelIdCanonLabels!: Sequelize.BelongsToManyCountAssociationsMixin;
151
+ // PlatformAlbum hasMany CanonToPlatformAlbumRelation via platformAlbumId
152
+ canonToPlatformAlbumRelations!: CanonToPlatformAlbumRelation[];
153
+ getCanonToPlatformAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformAlbumRelation>;
154
+ setCanonToPlatformAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
155
+ addCanonToPlatformAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
156
+ addCanonToPlatformAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
157
+ createCanonToPlatformAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformAlbumRelation>;
158
+ removeCanonToPlatformAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
159
+ removeCanonToPlatformAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
160
+ hasCanonToPlatformAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
161
+ hasCanonToPlatformAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
162
+ countCanonToPlatformAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
163
+ // PlatformAlbum hasMany PlatformAlbumGenreRelation via platformAlbumId
164
+ platformAlbumGenreRelations!: PlatformAlbumGenreRelation[];
165
+ getPlatformAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumGenreRelation>;
166
+ setPlatformAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
167
+ addPlatformAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
168
+ addPlatformAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
169
+ createPlatformAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumGenreRelation>;
170
+ removePlatformAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
171
+ removePlatformAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
172
+ hasPlatformAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
173
+ hasPlatformAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
174
+ countPlatformAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
175
+ // PlatformAlbum hasMany PlatformAlbumTrackRelation via platformAlbumId
176
+ platformAlbumTrackRelations!: PlatformAlbumTrackRelation[];
177
+ getPlatformAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumTrackRelation>;
178
+ setPlatformAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
179
+ addPlatformAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
180
+ addPlatformAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
181
+ createPlatformAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumTrackRelation>;
182
+ removePlatformAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
183
+ removePlatformAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
184
+ hasPlatformAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
185
+ hasPlatformAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
186
+ countPlatformAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
187
+ // PlatformAlbum belongsToMany PlatformArtist via platformAlbumId and platformArtistId
188
+ platformArtistIdPlatformArtistPlatformArtistAlbumRelations!: PlatformArtist[];
189
+ getPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
190
+ setPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
191
+ addPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
192
+ addPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
193
+ createPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
194
+ removePlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
195
+ removePlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
196
+ hasPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
197
+ hasPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
198
+ countPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
199
+ // PlatformAlbum hasMany PlatformArtistAlbumRelation via platformAlbumId
200
+ platformArtistAlbumRelations!: PlatformArtistAlbumRelation[];
201
+ getPlatformArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistAlbumRelation>;
202
+ setPlatformArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
203
+ addPlatformArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
204
+ addPlatformArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
205
+ createPlatformArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistAlbumRelation>;
206
+ removePlatformArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
207
+ removePlatformArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
208
+ hasPlatformArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
209
+ hasPlatformArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
210
+ countPlatformArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
211
+ // PlatformAlbum belongsToMany PlatformGenre via platformAlbumId and platformGenreId
212
+ platformGenreIdPlatformGenrePlatformAlbumGenreRelations!: PlatformGenre[];
213
+ getPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformGenre>;
214
+ setPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
215
+ addPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
216
+ addPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
217
+ createPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformGenre>;
218
+ removePlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
219
+ removePlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
220
+ hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
221
+ hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
222
+ countPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
223
+ // PlatformAlbum belongsToMany PlatformTrack via platformAlbumId and platformTrackId
224
+ platformTrackIdPlatformTrackPlatformAlbumTrackRelations!: PlatformTrack[];
225
+ getPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
226
+ setPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
227
+ addPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
228
+ addPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
229
+ createPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformTrack>;
230
+ removePlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
231
+ removePlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
232
+ hasPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
233
+ hasPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
234
+ countPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
235
+ // PlatformAlbum hasMany PlatformUserAlbum via platformAlbumId
236
+ platformUserAlbums!: PlatformUserAlbum[];
237
+ getPlatformUserAlbums!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbum>;
238
+ setPlatformUserAlbums!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
239
+ addPlatformUserAlbum!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
240
+ addPlatformUserAlbums!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
241
+ createPlatformUserAlbum!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbum>;
242
+ removePlatformUserAlbum!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
243
+ removePlatformUserAlbums!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
244
+ hasPlatformUserAlbum!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
245
+ hasPlatformUserAlbums!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
246
+ countPlatformUserAlbums!: Sequelize.HasManyCountAssociationsMixin;
247
+ // PlatformAlbum hasMany UnmatchedAlbum via platformAlbumId
248
+ unmatchedAlbums!: UnmatchedAlbum[];
249
+ getUnmatchedAlbums!: Sequelize.HasManyGetAssociationsMixin<UnmatchedAlbum>;
250
+ setUnmatchedAlbums!: Sequelize.HasManySetAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
251
+ addUnmatchedAlbum!: Sequelize.HasManyAddAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
252
+ addUnmatchedAlbums!: Sequelize.HasManyAddAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
253
+ createUnmatchedAlbum!: Sequelize.HasManyCreateAssociationMixin<UnmatchedAlbum>;
254
+ removeUnmatchedAlbum!: Sequelize.HasManyRemoveAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
255
+ removeUnmatchedAlbums!: Sequelize.HasManyRemoveAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
256
+ hasUnmatchedAlbum!: Sequelize.HasManyHasAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
257
+ hasUnmatchedAlbums!: Sequelize.HasManyHasAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
258
+ countUnmatchedAlbums!: Sequelize.HasManyCountAssociationsMixin;
259
+ // PlatformAlbum hasMany Versus via platformAlbumId
260
+ versus!: Versus[];
261
+ getVersus!: Sequelize.HasManyGetAssociationsMixin<Versus>;
262
+ setVersus!: Sequelize.HasManySetAssociationsMixin<Versus, VersusId>;
263
+ addVersu!: Sequelize.HasManyAddAssociationMixin<Versus, VersusId>;
264
+ addVersus!: Sequelize.HasManyAddAssociationsMixin<Versus, VersusId>;
265
+ createVersu!: Sequelize.HasManyCreateAssociationMixin<Versus>;
266
+ removeVersu!: Sequelize.HasManyRemoveAssociationMixin<Versus, VersusId>;
267
+ removeVersus!: Sequelize.HasManyRemoveAssociationsMixin<Versus, VersusId>;
268
+ hasVersu!: Sequelize.HasManyHasAssociationMixin<Versus, VersusId>;
269
+ hasVersus!: Sequelize.HasManyHasAssociationsMixin<Versus, VersusId>;
270
+ countVersus!: Sequelize.HasManyCountAssociationsMixin;
271
+ // PlatformAlbum hasMany VersusOption via platformAlbumId
272
+ versusOptions!: VersusOption[];
273
+ getVersusOptions!: Sequelize.HasManyGetAssociationsMixin<VersusOption>;
274
+ setVersusOptions!: Sequelize.HasManySetAssociationsMixin<VersusOption, VersusOptionId>;
275
+ addVersusOption!: Sequelize.HasManyAddAssociationMixin<VersusOption, VersusOptionId>;
276
+ addVersusOptions!: Sequelize.HasManyAddAssociationsMixin<VersusOption, VersusOptionId>;
277
+ createVersusOption!: Sequelize.HasManyCreateAssociationMixin<VersusOption>;
278
+ removeVersusOption!: Sequelize.HasManyRemoveAssociationMixin<VersusOption, VersusOptionId>;
279
+ removeVersusOptions!: Sequelize.HasManyRemoveAssociationsMixin<VersusOption, VersusOptionId>;
280
+ hasVersusOption!: Sequelize.HasManyHasAssociationMixin<VersusOption, VersusOptionId>;
281
+ hasVersusOptions!: Sequelize.HasManyHasAssociationsMixin<VersusOption, VersusOptionId>;
282
+ countVersusOptions!: Sequelize.HasManyCountAssociationsMixin;
283
+ // PlatformAlbum hasMany VersusPublishIssue via platformAlbumId
284
+ versusPublishIssues!: VersusPublishIssue[];
285
+ getVersusPublishIssues!: Sequelize.HasManyGetAssociationsMixin<VersusPublishIssue>;
286
+ setVersusPublishIssues!: Sequelize.HasManySetAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
287
+ addVersusPublishIssue!: Sequelize.HasManyAddAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
288
+ addVersusPublishIssues!: Sequelize.HasManyAddAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
289
+ createVersusPublishIssue!: Sequelize.HasManyCreateAssociationMixin<VersusPublishIssue>;
290
+ removeVersusPublishIssue!: Sequelize.HasManyRemoveAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
291
+ removeVersusPublishIssues!: Sequelize.HasManyRemoveAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
292
+ hasVersusPublishIssue!: Sequelize.HasManyHasAssociationMixin<VersusPublishIssue, VersusPublishIssueId>;
293
+ hasVersusPublishIssues!: Sequelize.HasManyHasAssociationsMixin<VersusPublishIssue, VersusPublishIssueId>;
294
+ countVersusPublishIssues!: Sequelize.HasManyCountAssociationsMixin;
295
+
296
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformAlbum {
297
+ return PlatformAlbum.init({
298
+ id: {
299
+ type: DataTypes.UUID,
300
+ allowNull: false,
301
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
302
+ primaryKey: true
303
+ },
304
+ platformId: {
305
+ type: DataTypes.SMALLINT,
306
+ allowNull: false,
307
+ references: {
308
+ model: 'platform',
309
+ key: 'id'
310
+ },
311
+ unique: "uk_platform_id_external_album_id",
312
+ field: 'platform_id'
313
+ },
314
+ externalAlbumId: {
315
+ type: DataTypes.TEXT,
316
+ allowNull: false,
317
+ unique: "uk_platform_id_external_album_id",
318
+ field: 'external_album_id'
319
+ },
320
+ name: {
321
+ type: DataTypes.TEXT,
322
+ allowNull: false
323
+ },
324
+ asciiName: {
325
+ type: DataTypes.TEXT,
326
+ allowNull: false,
327
+ field: 'ascii_name'
328
+ },
329
+ albumType: {
330
+ type: DataTypes.TEXT,
331
+ allowNull: true,
332
+ field: 'album_type'
333
+ },
334
+ releaseDate: {
335
+ type: DataTypes.TEXT,
336
+ allowNull: true,
337
+ field: 'release_date'
338
+ },
339
+ popularity: {
340
+ type: DataTypes.SMALLINT,
341
+ allowNull: true
342
+ },
343
+ recordLabel: {
344
+ type: DataTypes.TEXT,
345
+ allowNull: true,
346
+ field: 'record_label'
347
+ },
348
+ createDate: {
349
+ type: DataTypes.DATE,
350
+ allowNull: false,
351
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
352
+ field: 'create_date'
353
+ },
354
+ updateDate: {
355
+ type: DataTypes.DATE,
356
+ allowNull: false,
357
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
358
+ field: 'update_date'
359
+ },
360
+ images: {
361
+ type: DataTypes.JSONB,
362
+ allowNull: true
363
+ },
364
+ lastHarvestDate: {
365
+ type: DataTypes.DATE,
366
+ allowNull: true,
367
+ field: 'last_harvest_date'
368
+ },
369
+ lastHarvestLog: {
370
+ type: DataTypes.TEXT,
371
+ allowNull: true,
372
+ field: 'last_harvest_log'
373
+ }
374
+ }, {
375
+ sequelize,
376
+ tableName: 'platform_album',
377
+ schema: 'eb',
378
+ timestamps: false,
379
+ indexes: [
380
+ {
381
+ name: "platform_album_pkey",
382
+ unique: true,
383
+ fields: [
384
+ { name: "id" },
385
+ ]
386
+ },
387
+ {
388
+ name: "uk_platform_id_external_album_id",
389
+ unique: true,
390
+ fields: [
391
+ { name: "platform_id" },
392
+ { name: "external_album_id" },
393
+ ]
394
+ },
395
+ ]
396
+ });
397
+ }
398
+ }
@@ -0,0 +1,86 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
5
+
6
+ export interface PlatformAlbumGenreRelationAttributes {
7
+ platformAlbumId: string;
8
+ platformGenreId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformAlbumGenreRelationPk = "platformAlbumId" | "platformGenreId";
14
+ export type PlatformAlbumGenreRelationId = PlatformAlbumGenreRelation[PlatformAlbumGenreRelationPk];
15
+ export type PlatformAlbumGenreRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformAlbumGenreRelationCreationAttributes = Optional<PlatformAlbumGenreRelationAttributes, PlatformAlbumGenreRelationOptionalAttributes>;
17
+
18
+ export class PlatformAlbumGenreRelation extends Model<PlatformAlbumGenreRelationAttributes, PlatformAlbumGenreRelationCreationAttributes> implements PlatformAlbumGenreRelationAttributes {
19
+ platformAlbumId!: string;
20
+ platformGenreId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformAlbumGenreRelation belongsTo PlatformAlbum via platformAlbumId
25
+ platformAlbum!: PlatformAlbum;
26
+ getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
27
+ setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
28
+ createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
29
+ // PlatformAlbumGenreRelation 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 PlatformAlbumGenreRelation {
36
+ return PlatformAlbumGenreRelation.init({
37
+ platformAlbumId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_album',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_album_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_album_genre_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "platform_album_genre_relation_pkey",
77
+ unique: true,
78
+ fields: [
79
+ { name: "platform_album_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 { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
+
6
+ export interface PlatformAlbumTrackRelationAttributes {
7
+ platformAlbumId: string;
8
+ platformTrackId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformAlbumTrackRelationPk = "platformAlbumId" | "platformTrackId";
14
+ export type PlatformAlbumTrackRelationId = PlatformAlbumTrackRelation[PlatformAlbumTrackRelationPk];
15
+ export type PlatformAlbumTrackRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformAlbumTrackRelationCreationAttributes = Optional<PlatformAlbumTrackRelationAttributes, PlatformAlbumTrackRelationOptionalAttributes>;
17
+
18
+ export class PlatformAlbumTrackRelation extends Model<PlatformAlbumTrackRelationAttributes, PlatformAlbumTrackRelationCreationAttributes> implements PlatformAlbumTrackRelationAttributes {
19
+ platformAlbumId!: string;
20
+ platformTrackId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformAlbumTrackRelation belongsTo PlatformAlbum via platformAlbumId
25
+ platformAlbum!: PlatformAlbum;
26
+ getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
27
+ setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
28
+ createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
29
+ // PlatformAlbumTrackRelation 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 PlatformAlbumTrackRelation {
36
+ return PlatformAlbumTrackRelation.init({
37
+ platformAlbumId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_album',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_album_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_album_track_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "idx_platform_album_track_track",
77
+ fields: [
78
+ { name: "platform_track_id" },
79
+ ]
80
+ },
81
+ {
82
+ name: "platform_album_track_relation_pkey",
83
+ unique: true,
84
+ fields: [
85
+ { name: "platform_album_id" },
86
+ { name: "platform_track_id" },
87
+ ]
88
+ },
89
+ ]
90
+ });
91
+ }
92
+ }