@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,194 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
4
+ import type { CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId } from './CanonToPlatformGenreRelation';
5
+ import type { Platform, PlatformId } from './Platform';
6
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
7
+ import type { PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId } from './PlatformAlbumGenreRelation';
8
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
9
+ import type { PlatformArtistGenreRelation, PlatformArtistGenreRelationId } from './PlatformArtistGenreRelation';
10
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
11
+ import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from './PlatformTrackGenreRelation';
12
+
13
+ export interface PlatformGenreAttributes {
14
+ id: string;
15
+ platformId: number;
16
+ name: string;
17
+ createDate: Date;
18
+ updateDate: Date;
19
+ }
20
+
21
+ export type PlatformGenrePk = "id";
22
+ export type PlatformGenreId = PlatformGenre[PlatformGenrePk];
23
+ export type PlatformGenreOptionalAttributes = "id" | "createDate" | "updateDate";
24
+ export type PlatformGenreCreationAttributes = Optional<PlatformGenreAttributes, PlatformGenreOptionalAttributes>;
25
+
26
+ export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreCreationAttributes> implements PlatformGenreAttributes {
27
+ id!: string;
28
+ platformId!: number;
29
+ name!: string;
30
+ createDate!: Date;
31
+ updateDate!: Date;
32
+
33
+ // PlatformGenre belongsTo Platform via platformId
34
+ platform!: Platform;
35
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
36
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
37
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
38
+ // PlatformGenre belongsToMany CanonGenre via platformGenreId and canonGenreId
39
+ canonGenreIdCanonGenreCanonToPlatformGenreRelations!: CanonGenre[];
40
+ getCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonGenre>;
41
+ setCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonGenre, CanonGenreId>;
42
+ addCanonGenreIdCanonGenreCanonToPlatformGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonGenre, CanonGenreId>;
43
+ addCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonGenre, CanonGenreId>;
44
+ createCanonGenreIdCanonGenreCanonToPlatformGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonGenre>;
45
+ removeCanonGenreIdCanonGenreCanonToPlatformGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonGenre, CanonGenreId>;
46
+ removeCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonGenre, CanonGenreId>;
47
+ hasCanonGenreIdCanonGenreCanonToPlatformGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonGenre, CanonGenreId>;
48
+ hasCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonGenre, CanonGenreId>;
49
+ countCanonGenreIdCanonGenreCanonToPlatformGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
50
+ // PlatformGenre hasMany CanonToPlatformGenreRelation via platformGenreId
51
+ canonToPlatformGenreRelations!: CanonToPlatformGenreRelation[];
52
+ getCanonToPlatformGenreRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformGenreRelation>;
53
+ setCanonToPlatformGenreRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
54
+ addCanonToPlatformGenreRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
55
+ addCanonToPlatformGenreRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
56
+ createCanonToPlatformGenreRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformGenreRelation>;
57
+ removeCanonToPlatformGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
58
+ removeCanonToPlatformGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
59
+ hasCanonToPlatformGenreRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
60
+ hasCanonToPlatformGenreRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformGenreRelation, CanonToPlatformGenreRelationId>;
61
+ countCanonToPlatformGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
62
+ // PlatformGenre belongsToMany PlatformAlbum via platformGenreId and platformAlbumId
63
+ platformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: PlatformAlbum[];
64
+ getPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
65
+ setPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
66
+ addPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
67
+ addPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
68
+ createPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
69
+ removePlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
70
+ removePlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
71
+ hasPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
72
+ hasPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
73
+ countPlatformAlbumIdPlatformAlbumPlatformAlbumGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
74
+ // PlatformGenre hasMany PlatformAlbumGenreRelation via platformGenreId
75
+ platformAlbumGenreRelations!: PlatformAlbumGenreRelation[];
76
+ getPlatformAlbumGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumGenreRelation>;
77
+ setPlatformAlbumGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
78
+ addPlatformAlbumGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
79
+ addPlatformAlbumGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
80
+ createPlatformAlbumGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumGenreRelation>;
81
+ removePlatformAlbumGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
82
+ removePlatformAlbumGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
83
+ hasPlatformAlbumGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
84
+ hasPlatformAlbumGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumGenreRelation, PlatformAlbumGenreRelationId>;
85
+ countPlatformAlbumGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
86
+ // PlatformGenre belongsToMany PlatformArtist via platformGenreId and platformArtistId
87
+ platformArtistIdPlatformArtistPlatformArtistGenreRelations!: PlatformArtist[];
88
+ getPlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
89
+ setPlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
90
+ addPlatformArtistIdPlatformArtistPlatformArtistGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
91
+ addPlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
92
+ createPlatformArtistIdPlatformArtistPlatformArtistGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
93
+ removePlatformArtistIdPlatformArtistPlatformArtistGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
94
+ removePlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
95
+ hasPlatformArtistIdPlatformArtistPlatformArtistGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
96
+ hasPlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
97
+ countPlatformArtistIdPlatformArtistPlatformArtistGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
98
+ // PlatformGenre hasMany PlatformArtistGenreRelation via platformGenreId
99
+ platformArtistGenreRelations!: PlatformArtistGenreRelation[];
100
+ getPlatformArtistGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistGenreRelation>;
101
+ setPlatformArtistGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
102
+ addPlatformArtistGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
103
+ addPlatformArtistGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
104
+ createPlatformArtistGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistGenreRelation>;
105
+ removePlatformArtistGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
106
+ removePlatformArtistGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
107
+ hasPlatformArtistGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
108
+ hasPlatformArtistGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistGenreRelation, PlatformArtistGenreRelationId>;
109
+ countPlatformArtistGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
110
+ // PlatformGenre belongsToMany PlatformTrack via platformGenreId and platformTrackId
111
+ platformTrackIdPlatformTrackPlatformTrackGenreRelations!: PlatformTrack[];
112
+ getPlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformTrack>;
113
+ setPlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
114
+ addPlatformTrackIdPlatformTrackPlatformTrackGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
115
+ addPlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
116
+ createPlatformTrackIdPlatformTrackPlatformTrackGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformTrack>;
117
+ removePlatformTrackIdPlatformTrackPlatformTrackGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
118
+ removePlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
119
+ hasPlatformTrackIdPlatformTrackPlatformTrackGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
120
+ hasPlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
121
+ countPlatformTrackIdPlatformTrackPlatformTrackGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
122
+ // PlatformGenre hasMany PlatformTrackGenreRelation via platformGenreId
123
+ platformTrackGenreRelations!: PlatformTrackGenreRelation[];
124
+ getPlatformTrackGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformTrackGenreRelation>;
125
+ setPlatformTrackGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
126
+ addPlatformTrackGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
127
+ addPlatformTrackGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
128
+ createPlatformTrackGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformTrackGenreRelation>;
129
+ removePlatformTrackGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
130
+ removePlatformTrackGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
131
+ hasPlatformTrackGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
132
+ hasPlatformTrackGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
133
+ countPlatformTrackGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
134
+
135
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformGenre {
136
+ return PlatformGenre.init({
137
+ id: {
138
+ type: DataTypes.UUID,
139
+ allowNull: false,
140
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
141
+ primaryKey: true
142
+ },
143
+ platformId: {
144
+ type: DataTypes.SMALLINT,
145
+ allowNull: false,
146
+ references: {
147
+ model: 'platform',
148
+ key: 'id'
149
+ },
150
+ unique: "platform_genre_name_pkey",
151
+ field: 'platform_id'
152
+ },
153
+ name: {
154
+ type: DataTypes.TEXT,
155
+ allowNull: false,
156
+ unique: "platform_genre_name_pkey"
157
+ },
158
+ createDate: {
159
+ type: DataTypes.DATE,
160
+ allowNull: false,
161
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
162
+ field: 'create_date'
163
+ },
164
+ updateDate: {
165
+ type: DataTypes.DATE,
166
+ allowNull: false,
167
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
168
+ field: 'update_date'
169
+ }
170
+ }, {
171
+ sequelize,
172
+ tableName: 'platform_genre',
173
+ schema: 'eb',
174
+ timestamps: false,
175
+ indexes: [
176
+ {
177
+ name: "platform_genre_name_pkey",
178
+ unique: true,
179
+ fields: [
180
+ { name: "platform_id" },
181
+ { name: "name" },
182
+ ]
183
+ },
184
+ {
185
+ name: "platform_genre_pkey",
186
+ unique: true,
187
+ fields: [
188
+ { name: "id" },
189
+ ]
190
+ },
191
+ ]
192
+ });
193
+ }
194
+ }
@@ -0,0 +1,298 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonArtistTrackRelation, CanonArtistTrackRelationId } from './CanonArtistTrackRelation';
4
+ import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
5
+ import type { CanonTrack, CanonTrackId } from './CanonTrack';
6
+ import type { Platform, PlatformId } from './Platform';
7
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
8
+ import type { PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId } from './PlatformAlbumTrackRelation';
9
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
10
+ import type { PlatformArtistTrackRelation, PlatformArtistTrackRelationId } from './PlatformArtistTrackRelation';
11
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
12
+ import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from './PlatformTrackGenreRelation';
13
+ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
14
+ import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
15
+
16
+ export interface PlatformTrackAttributes {
17
+ id: string;
18
+ platformId: number;
19
+ externalTrackId: string;
20
+ name: string;
21
+ asciiName: string;
22
+ durationMs: number;
23
+ explicit?: boolean;
24
+ popularity?: number;
25
+ discNumber?: number;
26
+ discTrackNumber?: number;
27
+ createDate: Date;
28
+ updateDate: Date;
29
+ }
30
+
31
+ export type PlatformTrackPk = "id";
32
+ export type PlatformTrackId = PlatformTrack[PlatformTrackPk];
33
+ export type PlatformTrackOptionalAttributes = "id" | "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate";
34
+ export type PlatformTrackCreationAttributes = Optional<PlatformTrackAttributes, PlatformTrackOptionalAttributes>;
35
+
36
+ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackCreationAttributes> implements PlatformTrackAttributes {
37
+ id!: string;
38
+ platformId!: number;
39
+ externalTrackId!: string;
40
+ name!: string;
41
+ asciiName!: string;
42
+ durationMs!: number;
43
+ explicit?: boolean;
44
+ popularity?: number;
45
+ discNumber?: number;
46
+ discTrackNumber?: number;
47
+ createDate!: Date;
48
+ updateDate!: Date;
49
+
50
+ // PlatformTrack belongsTo Platform via platformId
51
+ platform!: Platform;
52
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
53
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
54
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
55
+ // PlatformTrack hasMany CanonArtistTrackRelation via canonTrackId
56
+ canonArtistTrackRelations!: CanonArtistTrackRelation[];
57
+ getCanonArtistTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonArtistTrackRelation>;
58
+ setCanonArtistTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
59
+ addCanonArtistTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
60
+ addCanonArtistTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
61
+ createCanonArtistTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonArtistTrackRelation>;
62
+ removeCanonArtistTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
63
+ removeCanonArtistTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
64
+ hasCanonArtistTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
65
+ hasCanonArtistTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonArtistTrackRelation, CanonArtistTrackRelationId>;
66
+ countCanonArtistTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
67
+ // PlatformTrack hasMany CanonToPlatformTrackRelation via platformTrackId
68
+ canonToPlatformTrackRelations!: CanonToPlatformTrackRelation[];
69
+ getCanonToPlatformTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformTrackRelation>;
70
+ setCanonToPlatformTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
71
+ addCanonToPlatformTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
72
+ addCanonToPlatformTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
73
+ createCanonToPlatformTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformTrackRelation>;
74
+ removeCanonToPlatformTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
75
+ removeCanonToPlatformTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
76
+ hasCanonToPlatformTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
77
+ hasCanonToPlatformTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId>;
78
+ countCanonToPlatformTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
79
+ // PlatformTrack belongsToMany CanonTrack via platformTrackId and canonTrackId
80
+ canonTrackIdCanonTrackCanonToPlatformTrackRelations!: CanonTrack[];
81
+ getCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonTrack>;
82
+ setCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonTrack, CanonTrackId>;
83
+ addCanonTrackIdCanonTrackCanonToPlatformTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonTrack, CanonTrackId>;
84
+ addCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonTrack, CanonTrackId>;
85
+ createCanonTrackIdCanonTrackCanonToPlatformTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonTrack>;
86
+ removeCanonTrackIdCanonTrackCanonToPlatformTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonTrack, CanonTrackId>;
87
+ removeCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonTrack, CanonTrackId>;
88
+ hasCanonTrackIdCanonTrackCanonToPlatformTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
89
+ hasCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
90
+ countCanonTrackIdCanonTrackCanonToPlatformTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
91
+ // PlatformTrack belongsToMany PlatformAlbum via platformTrackId and platformAlbumId
92
+ platformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: PlatformAlbum[];
93
+ getPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
94
+ setPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
95
+ addPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
96
+ addPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
97
+ createPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
98
+ removePlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
99
+ removePlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
100
+ hasPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
101
+ hasPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
102
+ countPlatformAlbumIdPlatformAlbumPlatformAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
103
+ // PlatformTrack hasMany PlatformAlbumTrackRelation via platformTrackId
104
+ platformAlbumTrackRelations!: PlatformAlbumTrackRelation[];
105
+ getPlatformAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbumTrackRelation>;
106
+ setPlatformAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
107
+ addPlatformAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
108
+ addPlatformAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
109
+ createPlatformAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbumTrackRelation>;
110
+ removePlatformAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
111
+ removePlatformAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
112
+ hasPlatformAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
113
+ hasPlatformAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbumTrackRelation, PlatformAlbumTrackRelationId>;
114
+ countPlatformAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
115
+ // PlatformTrack belongsToMany PlatformArtist via canonTrackId and canonArtistId
116
+ canonArtistIdPlatformArtistCanonArtistTrackRelations!: PlatformArtist[];
117
+ getCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
118
+ setCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
119
+ addCanonArtistIdPlatformArtistCanonArtistTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
120
+ addCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
121
+ createCanonArtistIdPlatformArtistCanonArtistTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
122
+ removeCanonArtistIdPlatformArtistCanonArtistTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
123
+ removeCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
124
+ hasCanonArtistIdPlatformArtistCanonArtistTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
125
+ hasCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
126
+ countCanonArtistIdPlatformArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
127
+ // PlatformTrack belongsToMany PlatformArtist via platformTrackId and platformArtistId
128
+ platformArtistIdPlatformArtistPlatformArtistTrackRelations!: PlatformArtist[];
129
+ getPlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformArtist>;
130
+ setPlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
131
+ addPlatformArtistIdPlatformArtistPlatformArtistTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
132
+ addPlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
133
+ createPlatformArtistIdPlatformArtistPlatformArtistTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformArtist>;
134
+ removePlatformArtistIdPlatformArtistPlatformArtistTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
135
+ removePlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
136
+ hasPlatformArtistIdPlatformArtistPlatformArtistTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
137
+ hasPlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
138
+ countPlatformArtistIdPlatformArtistPlatformArtistTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
139
+ // PlatformTrack hasMany PlatformArtistTrackRelation via platformTrackId
140
+ platformArtistTrackRelations!: PlatformArtistTrackRelation[];
141
+ getPlatformArtistTrackRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformArtistTrackRelation>;
142
+ setPlatformArtistTrackRelations!: Sequelize.HasManySetAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
143
+ addPlatformArtistTrackRelation!: Sequelize.HasManyAddAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
144
+ addPlatformArtistTrackRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
145
+ createPlatformArtistTrackRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformArtistTrackRelation>;
146
+ removePlatformArtistTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
147
+ removePlatformArtistTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
148
+ hasPlatformArtistTrackRelation!: Sequelize.HasManyHasAssociationMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
149
+ hasPlatformArtistTrackRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformArtistTrackRelation, PlatformArtistTrackRelationId>;
150
+ countPlatformArtistTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
151
+ // PlatformTrack belongsToMany PlatformGenre via platformTrackId and platformGenreId
152
+ platformGenreIdPlatformGenrePlatformTrackGenreRelations!: PlatformGenre[];
153
+ getPlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformGenre>;
154
+ setPlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
155
+ addPlatformGenreIdPlatformGenrePlatformTrackGenreRelation!: Sequelize.BelongsToManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
156
+ addPlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
157
+ createPlatformGenreIdPlatformGenrePlatformTrackGenreRelation!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformGenre>;
158
+ removePlatformGenreIdPlatformGenrePlatformTrackGenreRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
159
+ removePlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
160
+ hasPlatformGenreIdPlatformGenrePlatformTrackGenreRelation!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
161
+ hasPlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
162
+ countPlatformGenreIdPlatformGenrePlatformTrackGenreRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
163
+ // PlatformTrack hasMany PlatformTrackGenreRelation via platformTrackId
164
+ platformTrackGenreRelations!: PlatformTrackGenreRelation[];
165
+ getPlatformTrackGenreRelations!: Sequelize.HasManyGetAssociationsMixin<PlatformTrackGenreRelation>;
166
+ setPlatformTrackGenreRelations!: Sequelize.HasManySetAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
167
+ addPlatformTrackGenreRelation!: Sequelize.HasManyAddAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
168
+ addPlatformTrackGenreRelations!: Sequelize.HasManyAddAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
169
+ createPlatformTrackGenreRelation!: Sequelize.HasManyCreateAssociationMixin<PlatformTrackGenreRelation>;
170
+ removePlatformTrackGenreRelation!: Sequelize.HasManyRemoveAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
171
+ removePlatformTrackGenreRelations!: Sequelize.HasManyRemoveAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
172
+ hasPlatformTrackGenreRelation!: Sequelize.HasManyHasAssociationMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
173
+ hasPlatformTrackGenreRelations!: Sequelize.HasManyHasAssociationsMixin<PlatformTrackGenreRelation, PlatformTrackGenreRelationId>;
174
+ countPlatformTrackGenreRelations!: Sequelize.HasManyCountAssociationsMixin;
175
+ // PlatformTrack hasMany PlatformUserAlbumTrack via platformTrackId
176
+ platformUserAlbumTracks!: PlatformUserAlbumTrack[];
177
+ getPlatformUserAlbumTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbumTrack>;
178
+ setPlatformUserAlbumTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
179
+ addPlatformUserAlbumTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
180
+ addPlatformUserAlbumTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
181
+ createPlatformUserAlbumTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbumTrack>;
182
+ removePlatformUserAlbumTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
183
+ removePlatformUserAlbumTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
184
+ hasPlatformUserAlbumTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
185
+ hasPlatformUserAlbumTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
186
+ countPlatformUserAlbumTracks!: Sequelize.HasManyCountAssociationsMixin;
187
+ // PlatformTrack hasMany PlatformUserPlaylistTrack via platformTrackId
188
+ platformUserPlaylistTracks!: PlatformUserPlaylistTrack[];
189
+ getPlatformUserPlaylistTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
190
+ setPlatformUserPlaylistTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
191
+ addPlatformUserPlaylistTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
192
+ addPlatformUserPlaylistTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
193
+ createPlatformUserPlaylistTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistTrack>;
194
+ removePlatformUserPlaylistTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
195
+ removePlatformUserPlaylistTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
196
+ hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
197
+ hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
198
+ countPlatformUserPlaylistTracks!: Sequelize.HasManyCountAssociationsMixin;
199
+
200
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformTrack {
201
+ return PlatformTrack.init({
202
+ id: {
203
+ type: DataTypes.UUID,
204
+ allowNull: false,
205
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
206
+ primaryKey: true
207
+ },
208
+ platformId: {
209
+ type: DataTypes.SMALLINT,
210
+ allowNull: false,
211
+ references: {
212
+ model: 'platform',
213
+ key: 'id'
214
+ },
215
+ unique: "uk_platform_id_external_track_id",
216
+ field: 'platform_id'
217
+ },
218
+ externalTrackId: {
219
+ type: DataTypes.TEXT,
220
+ allowNull: false,
221
+ unique: "uk_platform_id_external_track_id",
222
+ field: 'external_track_id'
223
+ },
224
+ name: {
225
+ type: DataTypes.TEXT,
226
+ allowNull: false
227
+ },
228
+ asciiName: {
229
+ type: DataTypes.TEXT,
230
+ allowNull: false,
231
+ field: 'ascii_name'
232
+ },
233
+ durationMs: {
234
+ type: DataTypes.INTEGER,
235
+ allowNull: false,
236
+ field: 'duration_ms'
237
+ },
238
+ explicit: {
239
+ type: DataTypes.BOOLEAN,
240
+ allowNull: true
241
+ },
242
+ popularity: {
243
+ type: DataTypes.SMALLINT,
244
+ allowNull: true
245
+ },
246
+ discNumber: {
247
+ type: DataTypes.SMALLINT,
248
+ allowNull: true,
249
+ field: 'disc_number'
250
+ },
251
+ discTrackNumber: {
252
+ type: DataTypes.SMALLINT,
253
+ allowNull: true,
254
+ field: 'disc_track_number'
255
+ },
256
+ createDate: {
257
+ type: DataTypes.DATE,
258
+ allowNull: false,
259
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
260
+ field: 'create_date'
261
+ },
262
+ updateDate: {
263
+ type: DataTypes.DATE,
264
+ allowNull: false,
265
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
266
+ field: 'update_date'
267
+ }
268
+ }, {
269
+ sequelize,
270
+ tableName: 'platform_track',
271
+ schema: 'eb',
272
+ timestamps: false,
273
+ indexes: [
274
+ {
275
+ name: "idx_platform_track_external_track_id",
276
+ fields: [
277
+ { name: "external_track_id" },
278
+ ]
279
+ },
280
+ {
281
+ name: "platform_track_pkey1",
282
+ unique: true,
283
+ fields: [
284
+ { name: "id" },
285
+ ]
286
+ },
287
+ {
288
+ name: "uk_platform_id_external_track_id",
289
+ unique: true,
290
+ fields: [
291
+ { name: "platform_id" },
292
+ { name: "external_track_id" },
293
+ ]
294
+ },
295
+ ]
296
+ });
297
+ }
298
+ }
@@ -0,0 +1,86 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
4
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
+
6
+ export interface PlatformTrackGenreRelationAttributes {
7
+ platformGenreId: string;
8
+ platformTrackId: string;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type PlatformTrackGenreRelationPk = "platformGenreId" | "platformTrackId";
14
+ export type PlatformTrackGenreRelationId = PlatformTrackGenreRelation[PlatformTrackGenreRelationPk];
15
+ export type PlatformTrackGenreRelationOptionalAttributes = "createDate" | "updateDate";
16
+ export type PlatformTrackGenreRelationCreationAttributes = Optional<PlatformTrackGenreRelationAttributes, PlatformTrackGenreRelationOptionalAttributes>;
17
+
18
+ export class PlatformTrackGenreRelation extends Model<PlatformTrackGenreRelationAttributes, PlatformTrackGenreRelationCreationAttributes> implements PlatformTrackGenreRelationAttributes {
19
+ platformGenreId!: string;
20
+ platformTrackId!: string;
21
+ createDate!: Date;
22
+ updateDate!: Date;
23
+
24
+ // PlatformTrackGenreRelation belongsTo PlatformGenre via platformGenreId
25
+ platformGenre!: PlatformGenre;
26
+ getPlatformGenre!: Sequelize.BelongsToGetAssociationMixin<PlatformGenre>;
27
+ setPlatformGenre!: Sequelize.BelongsToSetAssociationMixin<PlatformGenre, PlatformGenreId>;
28
+ createPlatformGenre!: Sequelize.BelongsToCreateAssociationMixin<PlatformGenre>;
29
+ // PlatformTrackGenreRelation 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 PlatformTrackGenreRelation {
36
+ return PlatformTrackGenreRelation.init({
37
+ platformGenreId: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ primaryKey: true,
41
+ references: {
42
+ model: 'platform_genre',
43
+ key: 'id'
44
+ },
45
+ field: 'platform_genre_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_track_genre_relation',
72
+ schema: 'eb',
73
+ timestamps: false,
74
+ indexes: [
75
+ {
76
+ name: "platform_track_genre_relation_pkey",
77
+ unique: true,
78
+ fields: [
79
+ { name: "platform_track_id" },
80
+ { name: "platform_genre_id" },
81
+ ]
82
+ },
83
+ ]
84
+ });
85
+ }
86
+ }