@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.
Files changed (211) hide show
  1. package/.nvmrc +1 -0
  2. package/dist/AppUser.d.ts +161 -0
  3. package/dist/AppUser.js +121 -0
  4. package/dist/AppUserDevice.d.ts +26 -0
  5. package/dist/AppUserDevice.js +88 -0
  6. package/dist/AppUserFollowRelation.d.ts +34 -0
  7. package/dist/AppUserFollowRelation.js +113 -0
  8. package/dist/AppUserPlatformRelation.d.ts +43 -0
  9. package/dist/AppUserPlatformRelation.js +132 -0
  10. package/dist/CanonAlbum.d.ts +119 -0
  11. package/dist/CanonAlbum.js +117 -0
  12. package/dist/CanonAlbumExternalReferenceRelation.d.ts +31 -0
  13. package/dist/CanonAlbumExternalReferenceRelation.js +86 -0
  14. package/dist/CanonAlbumGenreRelation.d.ts +29 -0
  15. package/dist/CanonAlbumGenreRelation.js +82 -0
  16. package/dist/CanonAlbumImageHarvested.d.ts +30 -0
  17. package/dist/CanonAlbumImageHarvested.js +78 -0
  18. package/dist/CanonAlbumLabelRelation.d.ts +29 -0
  19. package/dist/CanonAlbumLabelRelation.js +82 -0
  20. package/dist/CanonAlbumTrackRelation.d.ts +29 -0
  21. package/dist/CanonAlbumTrackRelation.js +82 -0
  22. package/dist/CanonArtist.d.ts +91 -0
  23. package/dist/CanonArtist.js +114 -0
  24. package/dist/CanonArtistAlbumRelation.d.ts +29 -0
  25. package/dist/CanonArtistAlbumRelation.js +82 -0
  26. package/dist/CanonArtistExternalReferenceRelation.d.ts +31 -0
  27. package/dist/CanonArtistExternalReferenceRelation.js +86 -0
  28. package/dist/CanonArtistGenreRelation.d.ts +29 -0
  29. package/dist/CanonArtistGenreRelation.js +82 -0
  30. package/dist/CanonArtistImageHarvested.d.ts +30 -0
  31. package/dist/CanonArtistImageHarvested.js +70 -0
  32. package/dist/CanonArtistMemberRelation.d.ts +29 -0
  33. package/dist/CanonArtistMemberRelation.js +82 -0
  34. package/dist/CanonArtistTrackRelation.d.ts +29 -0
  35. package/dist/CanonArtistTrackRelation.js +82 -0
  36. package/dist/CanonGenre.d.ts +133 -0
  37. package/dist/CanonGenre.js +93 -0
  38. package/dist/CanonGenreExternalReferenceRelation.d.ts +31 -0
  39. package/dist/CanonGenreExternalReferenceRelation.js +86 -0
  40. package/dist/CanonLabel.d.ts +69 -0
  41. package/dist/CanonLabel.js +83 -0
  42. package/dist/CanonLabelExternalReferenceRelation.d.ts +31 -0
  43. package/dist/CanonLabelExternalReferenceRelation.js +86 -0
  44. package/dist/CanonMember.d.ts +71 -0
  45. package/dist/CanonMember.js +82 -0
  46. package/dist/CanonMemberExternalReferenceRelation.d.ts +33 -0
  47. package/dist/CanonMemberExternalReferenceRelation.js +91 -0
  48. package/dist/CanonToPlatformAlbumRelation.d.ts +29 -0
  49. package/dist/CanonToPlatformAlbumRelation.js +82 -0
  50. package/dist/CanonToPlatformArtistRelation.d.ts +29 -0
  51. package/dist/CanonToPlatformArtistRelation.js +82 -0
  52. package/dist/CanonToPlatformGenreRelation.d.ts +29 -0
  53. package/dist/CanonToPlatformGenreRelation.js +82 -0
  54. package/dist/CanonToPlatformTrackRelation.d.ts +29 -0
  55. package/dist/CanonToPlatformTrackRelation.js +82 -0
  56. package/dist/CanonTrack.d.ts +89 -0
  57. package/dist/CanonTrack.js +99 -0
  58. package/dist/ConfigParam.d.ts +19 -0
  59. package/dist/ConfigParam.js +70 -0
  60. package/dist/ExternalReference.d.ts +139 -0
  61. package/dist/ExternalReference.js +79 -0
  62. package/dist/JukeboxAccessType.d.ts +26 -0
  63. package/dist/JukeboxAccessType.js +36 -0
  64. package/dist/JukeboxCanonGenreRelation.d.ts +33 -0
  65. package/dist/JukeboxCanonGenreRelation.js +101 -0
  66. package/dist/JukeboxInvite.d.ts +39 -0
  67. package/dist/JukeboxInvite.js +98 -0
  68. package/dist/JukeboxQueueEntry.d.ts +74 -0
  69. package/dist/JukeboxQueueEntry.js +142 -0
  70. package/dist/JukeboxQueueMode.d.ts +26 -0
  71. package/dist/JukeboxQueueMode.js +36 -0
  72. package/dist/JukeboxSession.d.ts +108 -0
  73. package/dist/JukeboxSession.js +133 -0
  74. package/dist/JukeboxStatus.d.ts +26 -0
  75. package/dist/JukeboxStatus.js +34 -0
  76. package/dist/JukeboxTerminationCondition.d.ts +26 -0
  77. package/dist/JukeboxTerminationCondition.js +36 -0
  78. package/dist/JukeboxType.d.ts +26 -0
  79. package/dist/JukeboxType.js +36 -0
  80. package/dist/JukeboxUser.d.ts +56 -0
  81. package/dist/JukeboxUser.js +135 -0
  82. package/dist/JukeboxUserType.d.ts +26 -0
  83. package/dist/JukeboxUserType.js +34 -0
  84. package/dist/KnexMigrations.d.ts +19 -0
  85. package/dist/KnexMigrations.js +44 -0
  86. package/dist/KnexMigrationsLock.d.ts +15 -0
  87. package/dist/KnexMigrationsLock.js +36 -0
  88. package/dist/MetricsDaily.d.ts +19 -0
  89. package/dist/MetricsDaily.js +87 -0
  90. package/dist/MetricsEvent.d.ts +23 -0
  91. package/dist/MetricsEvent.js +117 -0
  92. package/dist/NewsSite.d.ts +21 -0
  93. package/dist/NewsSite.js +57 -0
  94. package/dist/PauseStatusType.d.ts +26 -0
  95. package/dist/PauseStatusType.js +34 -0
  96. package/dist/Platform.d.ts +127 -0
  97. package/dist/Platform.js +80 -0
  98. package/dist/PlatformAlbum.d.ts +232 -0
  99. package/dist/PlatformAlbum.js +123 -0
  100. package/dist/PlatformAlbumGenreRelation.d.ts +29 -0
  101. package/dist/PlatformAlbumGenreRelation.js +82 -0
  102. package/dist/PlatformAlbumTrackRelation.d.ts +29 -0
  103. package/dist/PlatformAlbumTrackRelation.js +82 -0
  104. package/dist/PlatformArtist.d.ts +225 -0
  105. package/dist/PlatformArtist.js +109 -0
  106. package/dist/PlatformArtistAlbumRelation.d.ts +29 -0
  107. package/dist/PlatformArtistAlbumRelation.js +82 -0
  108. package/dist/PlatformArtistGenreRelation.d.ts +29 -0
  109. package/dist/PlatformArtistGenreRelation.js +82 -0
  110. package/dist/PlatformArtistTrackRelation.d.ts +29 -0
  111. package/dist/PlatformArtistTrackRelation.js +82 -0
  112. package/dist/PlatformGenre.d.ts +122 -0
  113. package/dist/PlatformGenre.js +90 -0
  114. package/dist/PlatformTrack.d.ts +183 -0
  115. package/dist/PlatformTrack.js +129 -0
  116. package/dist/PlatformTrackGenreRelation.d.ts +29 -0
  117. package/dist/PlatformTrackGenreRelation.js +82 -0
  118. package/dist/PlatformUserAlbum.d.ts +54 -0
  119. package/dist/PlatformUserAlbum.js +121 -0
  120. package/dist/PlatformUserAlbumTrack.d.ts +42 -0
  121. package/dist/PlatformUserAlbumTrack.js +121 -0
  122. package/dist/PlatformUserPlaylist.d.ts +62 -0
  123. package/dist/PlatformUserPlaylist.js +135 -0
  124. package/dist/PlatformUserPlaylistTrack.d.ts +48 -0
  125. package/dist/PlatformUserPlaylistTrack.js +132 -0
  126. package/dist/PlaybackStatus.d.ts +26 -0
  127. package/dist/PlaybackStatus.js +36 -0
  128. package/dist/State.d.ts +50 -0
  129. package/dist/State.js +36 -0
  130. package/dist/TrackDeletionReason.d.ts +26 -0
  131. package/dist/TrackDeletionReason.js +34 -0
  132. package/dist/UnmatchedAlbum.d.ts +22 -0
  133. package/dist/UnmatchedAlbum.js +70 -0
  134. package/dist/UnmatchedArtist.d.ts +26 -0
  135. package/dist/UnmatchedArtist.js +81 -0
  136. package/dist/UserContacts.d.ts +46 -0
  137. package/dist/UserContacts.js +105 -0
  138. package/dist/init-models.d.ts +209 -0
  139. package/dist/init-models.js +507 -0
  140. package/model_options.json +3 -0
  141. package/models/AppUser.ts +267 -0
  142. package/models/AppUserDevice.ts +88 -0
  143. package/models/AppUserFollowRelation.ts +122 -0
  144. package/models/AppUserPlatformRelation.ts +150 -0
  145. package/models/CanonAlbum.ts +216 -0
  146. package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
  147. package/models/CanonAlbumGenreRelation.ts +86 -0
  148. package/models/CanonAlbumImageHarvested.ts +106 -0
  149. package/models/CanonAlbumLabelRelation.ts +86 -0
  150. package/models/CanonAlbumTrackRelation.ts +86 -0
  151. package/models/CanonArtist.ts +183 -0
  152. package/models/CanonArtistAlbumRelation.ts +86 -0
  153. package/models/CanonArtistExternalReferenceRelation.ts +92 -0
  154. package/models/CanonArtistGenreRelation.ts +86 -0
  155. package/models/CanonArtistImageHarvested.ts +98 -0
  156. package/models/CanonArtistMemberRelation.ts +86 -0
  157. package/models/CanonArtistTrackRelation.ts +86 -0
  158. package/models/CanonGenre.ts +208 -0
  159. package/models/CanonGenreExternalReferenceRelation.ts +92 -0
  160. package/models/CanonLabel.ts +129 -0
  161. package/models/CanonLabelExternalReferenceRelation.ts +92 -0
  162. package/models/CanonMember.ts +130 -0
  163. package/models/CanonMemberExternalReferenceRelation.ts +99 -0
  164. package/models/CanonToPlatformAlbumRelation.ts +86 -0
  165. package/models/CanonToPlatformArtistRelation.ts +86 -0
  166. package/models/CanonToPlatformGenreRelation.ts +86 -0
  167. package/models/CanonToPlatformTrackRelation.ts +86 -0
  168. package/models/CanonTrack.ts +167 -0
  169. package/models/ConfigParam.ts +62 -0
  170. package/models/ExternalReference.ts +201 -0
  171. package/models/JukeboxAccessType.ts +60 -0
  172. package/models/JukeboxCanonGenreRelation.ts +109 -0
  173. package/models/JukeboxInvite.ts +113 -0
  174. package/models/JukeboxQueueEntry.ts +195 -0
  175. package/models/JukeboxQueueMode.ts +60 -0
  176. package/models/JukeboxSession.ts +223 -0
  177. package/models/JukeboxStatus.ts +58 -0
  178. package/models/JukeboxTerminationCondition.ts +60 -0
  179. package/models/JukeboxType.ts +60 -0
  180. package/models/JukeboxUser.ts +169 -0
  181. package/models/JukeboxUserType.ts +58 -0
  182. package/models/KnexMigrations.ts +60 -0
  183. package/models/KnexMigrationsLock.ts +48 -0
  184. package/models/MetricsDaily.ts +79 -0
  185. package/models/MetricsEvent.ts +114 -0
  186. package/models/NewsSite.ts +75 -0
  187. package/models/PauseStatusType.ts +58 -0
  188. package/models/Platform.ts +189 -0
  189. package/models/PlatformAlbum.ts +345 -0
  190. package/models/PlatformAlbumGenreRelation.ts +86 -0
  191. package/models/PlatformAlbumTrackRelation.ts +86 -0
  192. package/models/PlatformArtist.ts +324 -0
  193. package/models/PlatformArtistAlbumRelation.ts +86 -0
  194. package/models/PlatformArtistGenreRelation.ts +86 -0
  195. package/models/PlatformArtistTrackRelation.ts +86 -0
  196. package/models/PlatformGenre.ts +194 -0
  197. package/models/PlatformTrack.ts +298 -0
  198. package/models/PlatformTrackGenreRelation.ts +86 -0
  199. package/models/PlatformUserAlbum.ts +152 -0
  200. package/models/PlatformUserAlbumTrack.ts +139 -0
  201. package/models/PlatformUserPlaylist.ts +174 -0
  202. package/models/PlatformUserPlaylistTrack.ts +156 -0
  203. package/models/PlaybackStatus.ts +60 -0
  204. package/models/State.ts +86 -0
  205. package/models/TrackDeletionReason.ts +58 -0
  206. package/models/UnmatchedAlbum.ts +66 -0
  207. package/models/UnmatchedArtist.ts +81 -0
  208. package/models/UserContacts.ts +149 -0
  209. package/models/init-models.ts +716 -0
  210. package/package.json +19 -0
  211. package/tsconfig.json +52 -0
@@ -0,0 +1,345 @@
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
+
21
+ export interface PlatformAlbumAttributes {
22
+ id: string;
23
+ platformId: number;
24
+ externalAlbumId: string;
25
+ name: string;
26
+ asciiName: string;
27
+ albumType?: string;
28
+ releaseDate?: string;
29
+ popularity?: number;
30
+ recordLabel?: string;
31
+ createDate: Date;
32
+ updateDate: Date;
33
+ images?: object;
34
+ }
35
+
36
+ export type PlatformAlbumPk = "id";
37
+ export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
38
+ export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images";
39
+ export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
40
+
41
+ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
42
+ id!: string;
43
+ platformId!: number;
44
+ externalAlbumId!: string;
45
+ name!: string;
46
+ asciiName!: string;
47
+ albumType?: string;
48
+ releaseDate?: string;
49
+ popularity?: number;
50
+ recordLabel?: string;
51
+ createDate!: Date;
52
+ updateDate!: Date;
53
+ images?: object;
54
+
55
+ // PlatformAlbum belongsTo Platform via platformId
56
+ platform!: Platform;
57
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
58
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
59
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
60
+ // PlatformAlbum belongsToMany CanonAlbum via platformAlbumId and canonAlbumId
61
+ canonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: CanonAlbum[];
62
+ getCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonAlbum>;
63
+ setCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonAlbum, CanonAlbumId>;
64
+ addCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonAlbum, CanonAlbumId>;
65
+ addCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonAlbum, CanonAlbumId>;
66
+ createCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonAlbum>;
67
+ removeCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonAlbum, CanonAlbumId>;
68
+ removeCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonAlbum, CanonAlbumId>;
69
+ hasCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonAlbum, CanonAlbumId>;
70
+ hasCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonAlbum, CanonAlbumId>;
71
+ countCanonAlbumIdCanonAlbumCanonToPlatformAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
72
+ // PlatformAlbum hasMany CanonAlbumGenreRelation via canonAlbumId
73
+ canonAlbumGenreRelations!: CanonAlbumGenreRelation[];
74
+ getCanonAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumGenreRelation>;
75
+ setCanonAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
76
+ addCanonAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
77
+ addCanonAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
78
+ createCanonAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumGenreRelation>;
79
+ removeCanonAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
80
+ removeCanonAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
81
+ hasCanonAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
82
+ hasCanonAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumGenreRelation, CanonAlbumGenreRelationId>;
83
+ countCanonAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
84
+ // PlatformAlbum hasMany CanonAlbumLabelRelation via canonAlbumId
85
+ canonAlbumLabelRelations!: CanonAlbumLabelRelation[];
86
+ getCanonAlbumLabelRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumLabelRelation>;
87
+ setCanonAlbumLabelRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
88
+ addCanonAlbumLabelRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
89
+ addCanonAlbumLabelRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
90
+ createCanonAlbumLabelRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumLabelRelation>;
91
+ removeCanonAlbumLabelRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
92
+ removeCanonAlbumLabelRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
93
+ hasCanonAlbumLabelRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
94
+ hasCanonAlbumLabelRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumLabelRelation, CanonAlbumLabelRelationId>;
95
+ countCanonAlbumLabelRelations!: Sequelize.HasManyCountAssociationsMixin;
96
+ // PlatformAlbum belongsToMany CanonArtist via canonAlbumId and canonArtistId
97
+ canonArtistIdCanonArtists!: CanonArtist[];
98
+ getCanonArtistIdCanonArtists!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
99
+ setCanonArtistIdCanonArtists!: Sequelize.BelongsToManySetAssociationsMixin<CanonArtist, CanonArtistId>;
100
+ addCanonArtistIdCanonArtist!: Sequelize.BelongsToManyAddAssociationMixin<CanonArtist, CanonArtistId>;
101
+ addCanonArtistIdCanonArtists!: Sequelize.BelongsToManyAddAssociationsMixin<CanonArtist, CanonArtistId>;
102
+ createCanonArtistIdCanonArtist!: Sequelize.BelongsToManyCreateAssociationMixin<CanonArtist>;
103
+ removeCanonArtistIdCanonArtist!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonArtist, CanonArtistId>;
104
+ removeCanonArtistIdCanonArtists!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonArtist, CanonArtistId>;
105
+ hasCanonArtistIdCanonArtist!: Sequelize.BelongsToManyHasAssociationMixin<CanonArtist, CanonArtistId>;
106
+ hasCanonArtistIdCanonArtists!: Sequelize.BelongsToManyHasAssociationsMixin<CanonArtist, CanonArtistId>;
107
+ countCanonArtistIdCanonArtists!: Sequelize.BelongsToManyCountAssociationsMixin;
108
+ // PlatformAlbum hasMany CanonArtistAlbumRelation via canonAlbumId
109
+ canonArtistAlbumRelations!: CanonArtistAlbumRelation[];
110
+ getCanonArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistAlbumRelation>;
111
+ setCanonArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
112
+ addCanonArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
113
+ addCanonArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
114
+ createCanonArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistAlbumRelation>;
115
+ removeCanonArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
116
+ removeCanonArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
117
+ hasCanonArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
118
+ hasCanonArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
119
+ countCanonArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
120
+ // PlatformAlbum belongsToMany CanonGenre via canonAlbumId and canonGenreId
121
+ canonGenreIdCanonGenres!: CanonGenre[];
122
+ getCanonGenreIdCanonGenres!: Sequelize.BelongsToManyGetAssociationsMixin<CanonGenre>;
123
+ setCanonGenreIdCanonGenres!: Sequelize.BelongsToManySetAssociationsMixin<CanonGenre, CanonGenreId>;
124
+ addCanonGenreIdCanonGenre!: Sequelize.BelongsToManyAddAssociationMixin<CanonGenre, CanonGenreId>;
125
+ addCanonGenreIdCanonGenres!: Sequelize.BelongsToManyAddAssociationsMixin<CanonGenre, CanonGenreId>;
126
+ createCanonGenreIdCanonGenre!: Sequelize.BelongsToManyCreateAssociationMixin<CanonGenre>;
127
+ removeCanonGenreIdCanonGenre!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonGenre, CanonGenreId>;
128
+ removeCanonGenreIdCanonGenres!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonGenre, CanonGenreId>;
129
+ hasCanonGenreIdCanonGenre!: Sequelize.BelongsToManyHasAssociationMixin<CanonGenre, CanonGenreId>;
130
+ hasCanonGenreIdCanonGenres!: Sequelize.BelongsToManyHasAssociationsMixin<CanonGenre, CanonGenreId>;
131
+ countCanonGenreIdCanonGenres!: Sequelize.BelongsToManyCountAssociationsMixin;
132
+ // PlatformAlbum belongsToMany CanonLabel via canonAlbumId and canonLabelId
133
+ canonLabelIdCanonLabels!: CanonLabel[];
134
+ getCanonLabelIdCanonLabels!: Sequelize.BelongsToManyGetAssociationsMixin<CanonLabel>;
135
+ setCanonLabelIdCanonLabels!: Sequelize.BelongsToManySetAssociationsMixin<CanonLabel, CanonLabelId>;
136
+ addCanonLabelIdCanonLabel!: Sequelize.BelongsToManyAddAssociationMixin<CanonLabel, CanonLabelId>;
137
+ addCanonLabelIdCanonLabels!: Sequelize.BelongsToManyAddAssociationsMixin<CanonLabel, CanonLabelId>;
138
+ createCanonLabelIdCanonLabel!: Sequelize.BelongsToManyCreateAssociationMixin<CanonLabel>;
139
+ removeCanonLabelIdCanonLabel!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonLabel, CanonLabelId>;
140
+ removeCanonLabelIdCanonLabels!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonLabel, CanonLabelId>;
141
+ hasCanonLabelIdCanonLabel!: Sequelize.BelongsToManyHasAssociationMixin<CanonLabel, CanonLabelId>;
142
+ hasCanonLabelIdCanonLabels!: Sequelize.BelongsToManyHasAssociationsMixin<CanonLabel, CanonLabelId>;
143
+ countCanonLabelIdCanonLabels!: Sequelize.BelongsToManyCountAssociationsMixin;
144
+ // PlatformAlbum hasMany CanonToPlatformAlbumRelation via platformAlbumId
145
+ canonToPlatformAlbumRelations!: CanonToPlatformAlbumRelation[];
146
+ getCanonToPlatformAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformAlbumRelation>;
147
+ setCanonToPlatformAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
148
+ addCanonToPlatformAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
149
+ addCanonToPlatformAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
150
+ createCanonToPlatformAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformAlbumRelation>;
151
+ removeCanonToPlatformAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
152
+ removeCanonToPlatformAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
153
+ hasCanonToPlatformAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
154
+ hasCanonToPlatformAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
155
+ countCanonToPlatformAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
156
+ // PlatformAlbum hasMany PlatformAlbumGenreRelation via platformAlbumId
157
+ platformAlbumGenreRelations!: PlatformAlbumGenreRelation[];
158
+ getPlatformAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumGenreRelation>;
159
+ setPlatformAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
160
+ addPlatformAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
161
+ addPlatformAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
162
+ createPlatformAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumGenreRelation>;
163
+ removePlatformAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
164
+ removePlatformAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
165
+ hasPlatformAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
166
+ hasPlatformAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
167
+ countPlatformAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
168
+ // PlatformAlbum hasMany PlatformAlbumTrackRelation via platformAlbumId
169
+ platformAlbumTrackRelations!: PlatformAlbumTrackRelation[];
170
+ getPlatformAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumTrackRelation>;
171
+ setPlatformAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
172
+ addPlatformAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
173
+ addPlatformAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
174
+ createPlatformAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumTrackRelation>;
175
+ removePlatformAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
176
+ removePlatformAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
177
+ hasPlatformAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
178
+ hasPlatformAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
179
+ countPlatformAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
180
+ // PlatformAlbum belongsToMany PlatformArtist via platformAlbumId and platformArtistId
181
+ platformArtistIdPlatformArtistPlatformArtistAlbumRelations!: PlatformArtist[];
182
+ getPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
183
+ setPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
184
+ addPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
185
+ addPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
186
+ createPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
187
+ removePlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
188
+ removePlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
189
+ hasPlatformArtistIdPlatformArtistPlatformArtistAlbumRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
190
+ hasPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
191
+ countPlatformArtistIdPlatformArtistPlatformArtistAlbumRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
192
+ // PlatformAlbum hasMany PlatformArtistAlbumRelation via platformAlbumId
193
+ platformArtistAlbumRelations!: PlatformArtistAlbumRelation[];
194
+ getPlatformArtistAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistAlbumRelation>;
195
+ setPlatformArtistAlbumRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
196
+ addPlatformArtistAlbumRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
197
+ addPlatformArtistAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
198
+ createPlatformArtistAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistAlbumRelation>;
199
+ removePlatformArtistAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
200
+ removePlatformArtistAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
201
+ hasPlatformArtistAlbumRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
202
+ hasPlatformArtistAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistAlbumRelation, PlatformArtistAlbumRelationId>;
203
+ countPlatformArtistAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
204
+ // PlatformAlbum belongsToMany PlatformGenre via platformAlbumId and platformGenreId
205
+ platformGenreIdPlatformGenrePlatformAlbumGenreRelations!: PlatformGenre[];
206
+ getPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformGenre>;
207
+ setPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
208
+ addPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
209
+ addPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
210
+ createPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformGenre>;
211
+ removePlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
212
+ removePlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
213
+ hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
214
+ hasPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
215
+ countPlatformGenreIdPlatformGenrePlatformAlbumGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
216
+ // PlatformAlbum belongsToMany PlatformTrack via platformAlbumId and platformTrackId
217
+ platformTrackIdPlatformTrackPlatformAlbumTrackRelations!: PlatformTrack[];
218
+ getPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
219
+ setPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
220
+ addPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
221
+ addPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
222
+ createPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformTrack>;
223
+ removePlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
224
+ removePlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
225
+ hasPlatformTrackIdPlatformTrackPlatformAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
226
+ hasPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
227
+ countPlatformTrackIdPlatformTrackPlatformAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
228
+ // PlatformAlbum hasMany PlatformUserAlbum via platformAlbumId
229
+ platformUserAlbums!: PlatformUserAlbum[];
230
+ getPlatformUserAlbums!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbum>;
231
+ setPlatformUserAlbums!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
232
+ addPlatformUserAlbum!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
233
+ addPlatformUserAlbums!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
234
+ createPlatformUserAlbum!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbum>;
235
+ removePlatformUserAlbum!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
236
+ removePlatformUserAlbums!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
237
+ hasPlatformUserAlbum!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
238
+ hasPlatformUserAlbums!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
239
+ countPlatformUserAlbums!: Sequelize.HasManyCountAssociationsMixin;
240
+ // PlatformAlbum hasMany UnmatchedAlbum via platformAlbumId
241
+ unmatchedAlbums!: UnmatchedAlbum[];
242
+ getUnmatchedAlbums!: Sequelize.HasManyGetAssociationsMixin<UnmatchedAlbum>;
243
+ setUnmatchedAlbums!: Sequelize.HasManySetAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
244
+ addUnmatchedAlbum!: Sequelize.HasManyAddAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
245
+ addUnmatchedAlbums!: Sequelize.HasManyAddAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
246
+ createUnmatchedAlbum!: Sequelize.HasManyCreateAssociationMixin<UnmatchedAlbum>;
247
+ removeUnmatchedAlbum!: Sequelize.HasManyRemoveAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
248
+ removeUnmatchedAlbums!: Sequelize.HasManyRemoveAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
249
+ hasUnmatchedAlbum!: Sequelize.HasManyHasAssociationMixin<UnmatchedAlbum, UnmatchedAlbumId>;
250
+ hasUnmatchedAlbums!: Sequelize.HasManyHasAssociationsMixin<UnmatchedAlbum, UnmatchedAlbumId>;
251
+ countUnmatchedAlbums!: Sequelize.HasManyCountAssociationsMixin;
252
+
253
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformAlbum {
254
+ return PlatformAlbum.init({
255
+ id: {
256
+ type: DataTypes.UUID,
257
+ allowNull: false,
258
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
259
+ primaryKey: true
260
+ },
261
+ platformId: {
262
+ type: DataTypes.SMALLINT,
263
+ allowNull: false,
264
+ references: {
265
+ model: 'platform',
266
+ key: 'id'
267
+ },
268
+ unique: "uk_platform_id_external_album_id",
269
+ field: 'platform_id'
270
+ },
271
+ externalAlbumId: {
272
+ type: DataTypes.TEXT,
273
+ allowNull: false,
274
+ unique: "uk_platform_id_external_album_id",
275
+ field: 'external_album_id'
276
+ },
277
+ name: {
278
+ type: DataTypes.TEXT,
279
+ allowNull: false
280
+ },
281
+ asciiName: {
282
+ type: DataTypes.TEXT,
283
+ allowNull: false,
284
+ field: 'ascii_name'
285
+ },
286
+ albumType: {
287
+ type: DataTypes.TEXT,
288
+ allowNull: true,
289
+ field: 'album_type'
290
+ },
291
+ releaseDate: {
292
+ type: DataTypes.TEXT,
293
+ allowNull: true,
294
+ field: 'release_date'
295
+ },
296
+ popularity: {
297
+ type: DataTypes.SMALLINT,
298
+ allowNull: true
299
+ },
300
+ recordLabel: {
301
+ type: DataTypes.TEXT,
302
+ allowNull: true,
303
+ field: 'record_label'
304
+ },
305
+ createDate: {
306
+ type: DataTypes.DATE,
307
+ allowNull: false,
308
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
309
+ field: 'create_date'
310
+ },
311
+ updateDate: {
312
+ type: DataTypes.DATE,
313
+ allowNull: false,
314
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
315
+ field: 'update_date'
316
+ },
317
+ images: {
318
+ type: DataTypes.JSONB,
319
+ allowNull: true
320
+ }
321
+ }, {
322
+ sequelize,
323
+ tableName: 'platform_album',
324
+ schema: 'eb',
325
+ timestamps: false,
326
+ indexes: [
327
+ {
328
+ name: "platform_album_pkey",
329
+ unique: true,
330
+ fields: [
331
+ { name: "id" },
332
+ ]
333
+ },
334
+ {
335
+ name: "uk_platform_id_external_album_id",
336
+ unique: true,
337
+ fields: [
338
+ { name: "platform_id" },
339
+ { name: "external_album_id" },
340
+ ]
341
+ },
342
+ ]
343
+ });
344
+ }
345
+ }
@@ -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,86 @@
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: "platform_album_track_relation_pkey",
77
+ unique: true,
78
+ fields: [
79
+ { name: "platform_album_id" },
80
+ { name: "platform_track_id" },
81
+ ]
82
+ },
83
+ ]
84
+ });
85
+ }
86
+ }