@earbug/db-models 0.0.60 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/.dockerignore +10 -0
  2. package/.github/workflows/publish.yaml +266 -19
  3. package/Dockerfile.generate +19 -0
  4. package/dist/AffinityRelationshipType.d.ts +2 -2
  5. package/dist/AffinityRelationshipType.js +6 -6
  6. package/dist/AppUser.d.ts +5 -5
  7. package/dist/AppUser.js +7 -7
  8. package/dist/AppUserDevice.d.ts +2 -2
  9. package/dist/AppUserDevice.js +6 -6
  10. package/dist/AppUserDeviceClassicBackup20260906.d.ts +23 -0
  11. package/dist/AppUserDeviceClassicBackup20260906.js +46 -0
  12. package/dist/AppUserFollowRelation.d.ts +3 -3
  13. package/dist/AppUserFollowRelation.js +6 -6
  14. package/dist/AppUserPlatformRelation.d.ts +13 -13
  15. package/dist/AppUserPlatformRelation.js +25 -25
  16. package/dist/CanonAlbum.d.ts +5 -5
  17. package/dist/CanonAlbum.js +10 -10
  18. package/dist/CanonArtist.d.ts +5 -5
  19. package/dist/CanonArtist.js +11 -11
  20. package/dist/CanonGenre.d.ts +3 -3
  21. package/dist/CanonGenre.js +6 -6
  22. package/dist/CanonLabel.d.ts +2 -2
  23. package/dist/CanonLabel.js +6 -6
  24. package/dist/CanonMember.d.ts +3 -3
  25. package/dist/CanonMember.js +6 -6
  26. package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
  27. package/dist/CanonMemberExternalReferenceRelation.js +5 -5
  28. package/dist/CanonTrack.d.ts +5 -5
  29. package/dist/CanonTrack.js +11 -11
  30. package/dist/ConfigParam.d.ts +2 -2
  31. package/dist/ConfigParam.js +5 -5
  32. package/dist/ExternalReference.d.ts +2 -2
  33. package/dist/ExternalReference.js +5 -5
  34. package/dist/FeedContentType.d.ts +2 -2
  35. package/dist/FeedContentType.js +4 -4
  36. package/dist/GuestUser.d.ts +5 -5
  37. package/dist/GuestUser.js +13 -13
  38. package/dist/JukeboxAccessType.d.ts +2 -2
  39. package/dist/JukeboxAccessType.js +4 -4
  40. package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
  41. package/dist/JukeboxCanonGenreRelation.js +6 -6
  42. package/dist/JukeboxInvite.d.ts +3 -3
  43. package/dist/JukeboxInvite.js +6 -6
  44. package/dist/JukeboxQueueEntry.d.ts +9 -9
  45. package/dist/JukeboxQueueEntry.js +25 -25
  46. package/dist/JukeboxQueueMode.d.ts +2 -2
  47. package/dist/JukeboxQueueMode.js +4 -4
  48. package/dist/JukeboxSession.d.ts +9 -9
  49. package/dist/JukeboxSession.js +20 -20
  50. package/dist/JukeboxSessionArtistAffinity.d.ts +2 -2
  51. package/dist/JukeboxSessionArtistAffinity.js +6 -6
  52. package/dist/JukeboxSessionGenreAffinity.d.ts +2 -2
  53. package/dist/JukeboxSessionGenreAffinity.js +6 -6
  54. package/dist/JukeboxTerminationCondition.d.ts +2 -2
  55. package/dist/JukeboxTerminationCondition.js +4 -4
  56. package/dist/JukeboxType.d.ts +2 -2
  57. package/dist/JukeboxType.js +4 -4
  58. package/dist/JukeboxUser.d.ts +7 -7
  59. package/dist/JukeboxUser.js +20 -20
  60. package/dist/KnexMigrations.d.ts +3 -3
  61. package/dist/KnexMigrations.js +6 -6
  62. package/dist/KnexMigrationsLock.d.ts +3 -3
  63. package/dist/KnexMigrationsLock.js +5 -5
  64. package/dist/MerchItem.d.ts +3 -3
  65. package/dist/MerchItem.js +6 -6
  66. package/dist/MerchOrchestration.d.ts +3 -3
  67. package/dist/MerchOrchestration.js +6 -6
  68. package/dist/MerchPlatform.d.ts +2 -2
  69. package/dist/MerchPlatform.js +6 -6
  70. package/dist/MerchType.d.ts +2 -2
  71. package/dist/MerchType.js +4 -4
  72. package/dist/MetricsDaily.d.ts +3 -3
  73. package/dist/MetricsDaily.js +4 -4
  74. package/dist/NewsSite.d.ts +3 -3
  75. package/dist/NewsSite.js +6 -6
  76. package/dist/Notification.d.ts +13 -13
  77. package/dist/Notification.js +33 -33
  78. package/dist/Platform.d.ts +2 -2
  79. package/dist/Platform.js +7 -7
  80. package/dist/PlatformAlbum.d.ts +5 -5
  81. package/dist/PlatformAlbum.js +10 -10
  82. package/dist/PlatformArtist.d.ts +5 -5
  83. package/dist/PlatformArtist.js +10 -10
  84. package/dist/PlatformGenre.d.ts +2 -2
  85. package/dist/PlatformGenre.js +6 -6
  86. package/dist/PlatformTrack.d.ts +3 -3
  87. package/dist/PlatformTrack.js +6 -6
  88. package/dist/PlatformUserAlbum.d.ts +2 -2
  89. package/dist/PlatformUserAlbum.js +6 -6
  90. package/dist/PlatformUserAlbumTrack.d.ts +4 -4
  91. package/dist/PlatformUserAlbumTrack.js +11 -11
  92. package/dist/PlatformUserPlaylist.d.ts +5 -5
  93. package/dist/PlatformUserPlaylist.js +11 -11
  94. package/dist/PlatformUserPlaylistArtistAffinity.d.ts +4 -4
  95. package/dist/PlatformUserPlaylistArtistAffinity.js +12 -12
  96. package/dist/PlatformUserPlaylistGenreAffinity.d.ts +2 -2
  97. package/dist/PlatformUserPlaylistGenreAffinity.js +6 -6
  98. package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
  99. package/dist/PlatformUserPlaylistTrack.js +17 -17
  100. package/dist/PlaybackStatus.d.ts +2 -2
  101. package/dist/PlaybackStatus.js +4 -4
  102. package/dist/RadioShow.d.ts +3 -3
  103. package/dist/RadioShow.js +6 -6
  104. package/dist/RadioShowMedia.d.ts +3 -3
  105. package/dist/RadioShowMedia.js +6 -6
  106. package/dist/RadioShowPlacement.d.ts +3 -3
  107. package/dist/RadioShowPlacement.js +6 -6
  108. package/dist/RadioShowPublishRequests.d.ts +3 -3
  109. package/dist/RadioShowPublishRequests.js +6 -6
  110. package/dist/State.d.ts +2 -2
  111. package/dist/State.js +4 -4
  112. package/dist/UnmatchedAlbum.d.ts +2 -2
  113. package/dist/UnmatchedAlbum.js +6 -6
  114. package/dist/UnmatchedArtist.d.ts +2 -2
  115. package/dist/UnmatchedArtist.js +6 -6
  116. package/dist/UserAbuseReports.d.ts +7 -7
  117. package/dist/UserAbuseReports.js +18 -18
  118. package/dist/UserAffinity.d.ts +2 -2
  119. package/dist/UserAffinity.js +6 -6
  120. package/dist/UserArtistAffinity.d.ts +2 -2
  121. package/dist/UserArtistAffinity.js +6 -6
  122. package/dist/UserBookmarks.d.ts +3 -3
  123. package/dist/UserBookmarks.js +6 -6
  124. package/dist/UserComments.d.ts +5 -5
  125. package/dist/UserComments.js +12 -12
  126. package/dist/UserContacts.d.ts +3 -3
  127. package/dist/UserContacts.js +7 -7
  128. package/dist/UserEngagementFactor.d.ts +2 -2
  129. package/dist/UserEngagementFactor.js +6 -6
  130. package/dist/UserGenreAffinity.d.ts +2 -2
  131. package/dist/UserGenreAffinity.js +6 -6
  132. package/dist/UserLikes.d.ts +3 -3
  133. package/dist/UserLikes.js +6 -6
  134. package/dist/UserMessages.d.ts +5 -5
  135. package/dist/UserMessages.js +15 -15
  136. package/dist/Versus.d.ts +5 -5
  137. package/dist/Versus.js +11 -11
  138. package/dist/VersusCoCreator.d.ts +4 -4
  139. package/dist/VersusCoCreator.js +12 -12
  140. package/dist/VersusOption.d.ts +3 -3
  141. package/dist/VersusOption.js +6 -6
  142. package/dist/VersusPublishIssue.d.ts +3 -3
  143. package/dist/VersusPublishIssue.js +6 -6
  144. package/dist/VersusQuestion.d.ts +2 -2
  145. package/dist/VersusQuestion.js +6 -6
  146. package/dist/VersusVote.d.ts +2 -2
  147. package/dist/VersusVote.js +6 -6
  148. package/dist/init-models.d.ts +349 -3
  149. package/dist/init-models.js +905 -1
  150. package/models/AffinityRelationshipType.ts +8 -8
  151. package/models/AppUser.ts +12 -12
  152. package/models/AppUserDevice.ts +8 -8
  153. package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
  154. package/models/AppUserFollowRelation.ts +9 -9
  155. package/models/AppUserPlatformRelation.ts +38 -38
  156. package/models/CanonAlbum.ts +15 -15
  157. package/models/CanonArtist.ts +16 -16
  158. package/models/CanonGenre.ts +9 -9
  159. package/models/CanonLabel.ts +8 -8
  160. package/models/CanonMember.ts +9 -9
  161. package/models/CanonMemberExternalReferenceRelation.ts +7 -7
  162. package/models/CanonTrack.ts +16 -16
  163. package/models/ConfigParam.ts +7 -7
  164. package/models/ExternalReference.ts +7 -7
  165. package/models/FeedContentType.ts +6 -6
  166. package/models/GuestUser.ts +18 -18
  167. package/models/JukeboxAccessType.ts +6 -6
  168. package/models/JukeboxCanonGenreRelation.ts +8 -8
  169. package/models/JukeboxInvite.ts +9 -9
  170. package/models/JukeboxQueueEntry.ts +34 -34
  171. package/models/JukeboxQueueMode.ts +6 -6
  172. package/models/JukeboxSession.ts +29 -29
  173. package/models/JukeboxSessionArtistAffinity.ts +8 -8
  174. package/models/JukeboxSessionGenreAffinity.ts +8 -8
  175. package/models/JukeboxTerminationCondition.ts +6 -6
  176. package/models/JukeboxType.ts +6 -6
  177. package/models/JukeboxUser.ts +27 -27
  178. package/models/KnexMigrations.ts +9 -9
  179. package/models/KnexMigrationsLock.ts +8 -8
  180. package/models/MerchItem.ts +9 -9
  181. package/models/MerchOrchestration.ts +9 -9
  182. package/models/MerchPlatform.ts +8 -8
  183. package/models/MerchType.ts +6 -6
  184. package/models/MetricsDaily.ts +7 -7
  185. package/models/NewsSite.ts +9 -9
  186. package/models/Notification.ts +46 -46
  187. package/models/Platform.ts +9 -9
  188. package/models/PlatformAlbum.ts +15 -15
  189. package/models/PlatformArtist.ts +15 -15
  190. package/models/PlatformGenre.ts +8 -8
  191. package/models/PlatformTrack.ts +9 -9
  192. package/models/PlatformUserAlbum.ts +8 -8
  193. package/models/PlatformUserAlbumTrack.ts +15 -15
  194. package/models/PlatformUserPlaylist.ts +16 -16
  195. package/models/PlatformUserPlaylistArtistAffinity.ts +16 -16
  196. package/models/PlatformUserPlaylistGenreAffinity.ts +8 -8
  197. package/models/PlatformUserPlaylistTrack.ts +24 -24
  198. package/models/PlaybackStatus.ts +6 -6
  199. package/models/RadioShow.ts +9 -9
  200. package/models/RadioShowMedia.ts +9 -9
  201. package/models/RadioShowPlacement.ts +9 -9
  202. package/models/RadioShowPublishRequests.ts +9 -9
  203. package/models/State.ts +6 -6
  204. package/models/UnmatchedAlbum.ts +8 -8
  205. package/models/UnmatchedArtist.ts +8 -8
  206. package/models/UserAbuseReports.ts +25 -25
  207. package/models/UserAffinity.ts +8 -8
  208. package/models/UserArtistAffinity.ts +8 -8
  209. package/models/UserBookmarks.ts +9 -9
  210. package/models/UserComments.ts +17 -17
  211. package/models/UserContacts.ts +10 -10
  212. package/models/UserEngagementFactor.ts +8 -8
  213. package/models/UserGenreAffinity.ts +8 -8
  214. package/models/UserLikes.ts +9 -9
  215. package/models/UserMessages.ts +20 -20
  216. package/models/Versus.ts +16 -16
  217. package/models/VersusCoCreator.ts +16 -16
  218. package/models/VersusOption.ts +9 -9
  219. package/models/VersusPublishIssue.ts +9 -9
  220. package/models/VersusQuestion.ts +8 -8
  221. package/models/VersusVote.ts +8 -8
  222. package/models/init-models.ts +1245 -0
  223. package/package.json +1 -1
  224. package/scripts/generate-and-upload.mjs +123 -0
  225. package/dist/CanonAlbumImageHarvested.d.ts +0 -30
  226. package/dist/CanonAlbumImageHarvested.js +0 -70
  227. package/dist/CanonArtistImageHarvested.d.ts +0 -30
  228. package/dist/CanonArtistImageHarvested.js +0 -70
  229. package/models/CanonAlbumImageHarvested.ts +0 -98
  230. package/models/CanonArtistImageHarvested.ts +0 -98
@@ -6,11 +6,11 @@ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
6
6
  import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
7
7
 
8
8
  export interface PlatformUserAlbumAttributes {
9
+ id: string;
9
10
  appUserId: string;
10
11
  platformId: number;
11
12
  externalUserAlbumId: string;
12
13
  platformAlbumId: string;
13
- id: string;
14
14
  createdAt: Date;
15
15
  updatedAt: Date;
16
16
  stateId: number;
@@ -22,11 +22,11 @@ export type PlatformUserAlbumOptionalAttributes = "id" | "createdAt" | "updatedA
22
22
  export type PlatformUserAlbumCreationAttributes = Optional<PlatformUserAlbumAttributes, PlatformUserAlbumOptionalAttributes>;
23
23
 
24
24
  export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes> implements PlatformUserAlbumAttributes {
25
+ id!: string;
25
26
  appUserId!: string;
26
27
  platformId!: number;
27
28
  externalUserAlbumId!: string;
28
29
  platformAlbumId!: string;
29
- id!: string;
30
30
  createdAt!: Date;
31
31
  updatedAt!: Date;
32
32
  stateId!: number;
@@ -61,6 +61,12 @@ export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, Platfo
61
61
 
62
62
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbum {
63
63
  return PlatformUserAlbum.init({
64
+ id: {
65
+ type: DataTypes.UUID,
66
+ allowNull: false,
67
+ defaultValue: DataTypes.UUIDV4,
68
+ primaryKey: true
69
+ },
64
70
  appUserId: {
65
71
  type: DataTypes.UUID,
66
72
  allowNull: false,
@@ -95,12 +101,6 @@ export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, Platfo
95
101
  unique: "platform_user_album_app_user_id_platform_album_id_unique",
96
102
  field: 'platform_album_id'
97
103
  },
98
- id: {
99
- type: DataTypes.UUID,
100
- allowNull: false,
101
- defaultValue: DataTypes.UUIDV4,
102
- primaryKey: true
103
- },
104
104
  createdAt: {
105
105
  type: DataTypes.DATE,
106
106
  allowNull: false,
@@ -5,14 +5,14 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
5
  import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
6
6
 
7
7
  export interface PlatformUserAlbumTrackAttributes {
8
+ id: string;
8
9
  platformUserAlbumId: string;
9
10
  platformId: number;
10
11
  externalUserAlbumTrackId: string;
11
12
  platformTrackId: string;
12
- stateId: number;
13
- id: string;
14
13
  createdAt: Date;
15
14
  updatedAt: Date;
15
+ stateId: number;
16
16
  }
17
17
 
18
18
  export type PlatformUserAlbumTrackPk = "id";
@@ -21,14 +21,14 @@ export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "upd
21
21
  export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
22
22
 
23
23
  export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
24
+ id!: string;
24
25
  platformUserAlbumId!: string;
25
26
  platformId!: number;
26
27
  externalUserAlbumTrackId!: string;
27
28
  platformTrackId!: string;
28
- stateId!: number;
29
- id!: string;
30
29
  createdAt!: Date;
31
30
  updatedAt!: Date;
31
+ stateId!: number;
32
32
 
33
33
  // PlatformUserAlbumTrack belongsTo Platform via platformId
34
34
  platform!: Platform;
@@ -48,6 +48,12 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
48
48
 
49
49
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbumTrack {
50
50
  return PlatformUserAlbumTrack.init({
51
+ id: {
52
+ type: DataTypes.UUID,
53
+ allowNull: false,
54
+ defaultValue: DataTypes.UUIDV4,
55
+ primaryKey: true
56
+ },
51
57
  platformUserAlbumId: {
52
58
  type: DataTypes.UUID,
53
59
  allowNull: false,
@@ -82,17 +88,6 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
82
88
  unique: "platform_user_album_track_platform_user_album_id_platform_track",
83
89
  field: 'platform_track_id'
84
90
  },
85
- stateId: {
86
- type: DataTypes.SMALLINT,
87
- allowNull: false,
88
- field: 'state_id'
89
- },
90
- id: {
91
- type: DataTypes.UUID,
92
- allowNull: false,
93
- defaultValue: DataTypes.UUIDV4,
94
- primaryKey: true
95
- },
96
91
  createdAt: {
97
92
  type: DataTypes.DATE,
98
93
  allowNull: false,
@@ -104,6 +99,11 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
104
99
  allowNull: false,
105
100
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
106
101
  field: 'updated_at'
102
+ },
103
+ stateId: {
104
+ type: DataTypes.SMALLINT,
105
+ allowNull: false,
106
+ field: 'state_id'
107
107
  }
108
108
  }, {
109
109
  sequelize,
@@ -12,14 +12,14 @@ import type { UserComments, UserCommentsId } from './UserComments';
12
12
  import type { UserLikes, UserLikesId } from './UserLikes';
13
13
 
14
14
  export interface PlatformUserPlaylistAttributes {
15
+ id: string;
15
16
  appUserId: string;
16
17
  platformId: number;
17
18
  externalPlaylistId: string;
18
19
  name: string;
19
20
  description?: string;
20
- snapshotId: string;
21
- id: string;
22
21
  public?: boolean;
22
+ snapshotId: string;
23
23
  collaborative: boolean;
24
24
  createDate: Date;
25
25
  updateDate: Date;
@@ -29,18 +29,18 @@ export interface PlatformUserPlaylistAttributes {
29
29
 
30
30
  export type PlatformUserPlaylistPk = "id";
31
31
  export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
32
- export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId" | "earbugAccessControlPreference";
32
+ export type PlatformUserPlaylistOptionalAttributes = "id" | "description" | "public" | "createDate" | "updateDate" | "stateId" | "earbugAccessControlPreference";
33
33
  export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
34
34
 
35
35
  export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
36
+ id!: string;
36
37
  appUserId!: string;
37
38
  platformId!: number;
38
39
  externalPlaylistId!: string;
39
40
  name!: string;
40
41
  description?: string;
41
- snapshotId!: string;
42
- id!: string;
43
42
  public?: boolean;
43
+ snapshotId!: string;
44
44
  collaborative!: boolean;
45
45
  createDate!: Date;
46
46
  updateDate!: Date;
@@ -149,6 +149,12 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
149
149
 
150
150
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylist {
151
151
  return PlatformUserPlaylist.init({
152
+ id: {
153
+ type: DataTypes.UUID,
154
+ allowNull: false,
155
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
156
+ primaryKey: true
157
+ },
152
158
  appUserId: {
153
159
  type: DataTypes.UUID,
154
160
  allowNull: false,
@@ -183,22 +189,16 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
183
189
  type: DataTypes.TEXT,
184
190
  allowNull: true
185
191
  },
186
- snapshotId: {
187
- type: DataTypes.TEXT,
188
- allowNull: false,
189
- field: 'snapshot_id'
190
- },
191
- id: {
192
- type: DataTypes.UUID,
193
- allowNull: false,
194
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
195
- primaryKey: true
196
- },
197
192
  public: {
198
193
  type: DataTypes.BOOLEAN,
199
194
  allowNull: true,
200
195
  defaultValue: false
201
196
  },
197
+ snapshotId: {
198
+ type: DataTypes.TEXT,
199
+ allowNull: false,
200
+ field: 'snapshot_id'
201
+ },
202
202
  collaborative: {
203
203
  type: DataTypes.BOOLEAN,
204
204
  allowNull: false,
@@ -6,12 +6,12 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
6
6
 
7
7
  export interface PlatformUserPlaylistArtistAffinityAttributes {
8
8
  id: string;
9
- createdAt: Date;
10
- updatedAt: Date;
11
9
  platformUserPlaylistId: string;
12
10
  canonArtistId: string;
13
11
  affinityTierId: number;
14
12
  rank: number;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
15
  }
16
16
 
17
17
  export type PlatformUserPlaylistArtistAffinityPk = "id";
@@ -21,12 +21,12 @@ export type PlatformUserPlaylistArtistAffinityCreationAttributes = Optional<Plat
21
21
 
22
22
  export class PlatformUserPlaylistArtistAffinity extends Model<PlatformUserPlaylistArtistAffinityAttributes, PlatformUserPlaylistArtistAffinityCreationAttributes> implements PlatformUserPlaylistArtistAffinityAttributes {
23
23
  id!: string;
24
- createdAt!: Date;
25
- updatedAt!: Date;
26
24
  platformUserPlaylistId!: string;
27
25
  canonArtistId!: string;
28
26
  affinityTierId!: number;
29
27
  rank!: number;
28
+ createdAt!: Date;
29
+ updatedAt!: Date;
30
30
 
31
31
  // PlatformUserPlaylistArtistAffinity belongsTo AffinityTier via affinityTierId
32
32
  affinityTier!: AffinityTier;
@@ -52,18 +52,6 @@ export class PlatformUserPlaylistArtistAffinity extends Model<PlatformUserPlayli
52
52
  defaultValue: DataTypes.UUIDV4,
53
53
  primaryKey: true
54
54
  },
55
- createdAt: {
56
- type: DataTypes.DATE,
57
- allowNull: false,
58
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
59
- field: 'created_at'
60
- },
61
- updatedAt: {
62
- type: DataTypes.DATE,
63
- allowNull: false,
64
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
65
- field: 'updated_at'
66
- },
67
55
  platformUserPlaylistId: {
68
56
  type: DataTypes.UUID,
69
57
  allowNull: false,
@@ -96,6 +84,18 @@ export class PlatformUserPlaylistArtistAffinity extends Model<PlatformUserPlayli
96
84
  rank: {
97
85
  type: DataTypes.INTEGER,
98
86
  allowNull: false
87
+ },
88
+ createdAt: {
89
+ type: DataTypes.DATE,
90
+ allowNull: false,
91
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
92
+ field: 'created_at'
93
+ },
94
+ updatedAt: {
95
+ type: DataTypes.DATE,
96
+ allowNull: false,
97
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
98
+ field: 'updated_at'
99
99
  }
100
100
  }, {
101
101
  sequelize,
@@ -5,11 +5,11 @@ import type { CanonGenre, CanonGenreId } from './CanonGenre';
5
5
  import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
6
6
 
7
7
  export interface PlatformUserPlaylistGenreAffinityAttributes {
8
+ id: string;
8
9
  platformUserPlaylistId: string;
9
10
  canonGenreId: string;
10
11
  affinityTierId: number;
11
12
  rank: number;
12
- id: string;
13
13
  createdAt: Date;
14
14
  updatedAt: Date;
15
15
  }
@@ -20,11 +20,11 @@ export type PlatformUserPlaylistGenreAffinityOptionalAttributes = "id" | "create
20
20
  export type PlatformUserPlaylistGenreAffinityCreationAttributes = Optional<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityOptionalAttributes>;
21
21
 
22
22
  export class PlatformUserPlaylistGenreAffinity extends Model<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityCreationAttributes> implements PlatformUserPlaylistGenreAffinityAttributes {
23
+ id!: string;
23
24
  platformUserPlaylistId!: string;
24
25
  canonGenreId!: string;
25
26
  affinityTierId!: number;
26
27
  rank!: number;
27
- id!: string;
28
28
  createdAt!: Date;
29
29
  updatedAt!: Date;
30
30
 
@@ -46,6 +46,12 @@ export class PlatformUserPlaylistGenreAffinity extends Model<PlatformUserPlaylis
46
46
 
47
47
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistGenreAffinity {
48
48
  return PlatformUserPlaylistGenreAffinity.init({
49
+ id: {
50
+ type: DataTypes.UUID,
51
+ allowNull: false,
52
+ defaultValue: DataTypes.UUIDV4,
53
+ primaryKey: true
54
+ },
49
55
  platformUserPlaylistId: {
50
56
  type: DataTypes.UUID,
51
57
  allowNull: false,
@@ -79,12 +85,6 @@ export class PlatformUserPlaylistGenreAffinity extends Model<PlatformUserPlaylis
79
85
  type: DataTypes.INTEGER,
80
86
  allowNull: false
81
87
  },
82
- id: {
83
- type: DataTypes.UUID,
84
- allowNull: false,
85
- defaultValue: DataTypes.UUIDV4,
86
- primaryKey: true
87
- },
88
88
  createdAt: {
89
89
  type: DataTypes.DATE,
90
90
  allowNull: false,
@@ -5,36 +5,36 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
5
5
  import type { State, StateId } from './State';
6
6
 
7
7
  export interface PlatformUserPlaylistTrackAttributes {
8
+ id: string;
8
9
  platformTrackId: string;
9
10
  platformUserPlaylistId: string;
11
+ trackPosition: number;
10
12
  addedDate?: Date;
11
13
  addedByPlatformUserId?: string;
12
- externalPlaylistTrackId: string;
13
- id: string;
14
- trackPosition: number;
15
14
  isLocal: boolean;
16
15
  createDate: Date;
17
16
  updateDate: Date;
18
17
  stateId: number;
18
+ externalPlaylistTrackId: string;
19
19
  }
20
20
 
21
21
  export type PlatformUserPlaylistTrackPk = "id";
22
22
  export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
23
- export type PlatformUserPlaylistTrackOptionalAttributes = "addedDate" | "addedByPlatformUserId" | "id" | "trackPosition" | "createDate" | "updateDate" | "stateId";
23
+ export type PlatformUserPlaylistTrackOptionalAttributes = "id" | "trackPosition" | "addedDate" | "addedByPlatformUserId" | "createDate" | "updateDate" | "stateId";
24
24
  export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
25
25
 
26
26
  export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
27
+ id!: string;
27
28
  platformTrackId!: string;
28
29
  platformUserPlaylistId!: string;
30
+ trackPosition!: number;
29
31
  addedDate?: Date;
30
32
  addedByPlatformUserId?: string;
31
- externalPlaylistTrackId!: string;
32
- id!: string;
33
- trackPosition!: number;
34
33
  isLocal!: boolean;
35
34
  createDate!: Date;
36
35
  updateDate!: Date;
37
36
  stateId!: number;
37
+ externalPlaylistTrackId!: string;
38
38
 
39
39
  // PlatformUserPlaylistTrack belongsTo PlatformTrack via platformTrackId
40
40
  platformTrack!: PlatformTrack;
@@ -54,6 +54,12 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
54
54
 
55
55
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistTrack {
56
56
  return PlatformUserPlaylistTrack.init({
57
+ id: {
58
+ type: DataTypes.UUID,
59
+ allowNull: false,
60
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
61
+ primaryKey: true
62
+ },
57
63
  platformTrackId: {
58
64
  type: DataTypes.UUID,
59
65
  allowNull: false,
@@ -74,6 +80,12 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
74
80
  unique: "uk_playlist_id_track_id",
75
81
  field: 'platform_user_playlist_id'
76
82
  },
83
+ trackPosition: {
84
+ type: DataTypes.INTEGER,
85
+ allowNull: false,
86
+ defaultValue: 0,
87
+ field: 'track_position'
88
+ },
77
89
  addedDate: {
78
90
  type: DataTypes.DATE,
79
91
  allowNull: true,
@@ -84,23 +96,6 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
84
96
  allowNull: true,
85
97
  field: 'added_by_platform_user_id'
86
98
  },
87
- externalPlaylistTrackId: {
88
- type: DataTypes.STRING(255),
89
- allowNull: false,
90
- field: 'external_playlist_track_id'
91
- },
92
- id: {
93
- type: DataTypes.UUID,
94
- allowNull: false,
95
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
96
- primaryKey: true
97
- },
98
- trackPosition: {
99
- type: DataTypes.INTEGER,
100
- allowNull: false,
101
- defaultValue: 0,
102
- field: 'track_position'
103
- },
104
99
  isLocal: {
105
100
  type: DataTypes.BOOLEAN,
106
101
  allowNull: false,
@@ -128,6 +123,11 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
128
123
  key: 'id'
129
124
  },
130
125
  field: 'state_id'
126
+ },
127
+ externalPlaylistTrackId: {
128
+ type: DataTypes.STRING(255),
129
+ allowNull: false,
130
+ field: 'external_playlist_track_id'
131
131
  }
132
132
  }, {
133
133
  sequelize,
@@ -2,8 +2,8 @@ import * as Sequelize from 'sequelize';
2
2
  import { DataTypes, Model, Optional } from 'sequelize';
3
3
 
4
4
  export interface PlaybackStatusAttributes {
5
- description: string;
6
5
  id: number;
6
+ description: string;
7
7
  }
8
8
 
9
9
  export type PlaybackStatusPk = "id";
@@ -11,22 +11,22 @@ export type PlaybackStatusId = PlaybackStatus[PlaybackStatusPk];
11
11
  export type PlaybackStatusCreationAttributes = PlaybackStatusAttributes;
12
12
 
13
13
  export class PlaybackStatus extends Model<PlaybackStatusAttributes, PlaybackStatusCreationAttributes> implements PlaybackStatusAttributes {
14
- description!: string;
15
14
  id!: number;
15
+ description!: string;
16
16
 
17
17
 
18
18
  static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatus {
19
19
  return PlaybackStatus.init({
20
- description: {
21
- type: DataTypes.TEXT,
22
- allowNull: false
23
- },
24
20
  id: {
25
21
  autoIncrement: true,
26
22
  autoIncrementIdentity: true,
27
23
  type: DataTypes.SMALLINT,
28
24
  allowNull: false,
29
25
  primaryKey: true
26
+ },
27
+ description: {
28
+ type: DataTypes.TEXT,
29
+ allowNull: false
30
30
  }
31
31
  }, {
32
32
  sequelize,
@@ -11,28 +11,28 @@ import type { UserComments, UserCommentsId } from './UserComments';
11
11
  import type { UserLikes, UserLikesId } from './UserLikes';
12
12
 
13
13
  export interface RadioShowAttributes {
14
+ id: string;
14
15
  creatorUserId: string;
15
16
  scheduledRelease?: Date;
16
17
  title: string;
17
18
  description?: string;
18
19
  deleted?: boolean;
19
- id: string;
20
20
  createDate: Date;
21
21
  updateDate: Date;
22
22
  }
23
23
 
24
24
  export type RadioShowPk = "id";
25
25
  export type RadioShowId = RadioShow[RadioShowPk];
26
- export type RadioShowOptionalAttributes = "scheduledRelease" | "description" | "deleted" | "id" | "createDate" | "updateDate";
26
+ export type RadioShowOptionalAttributes = "id" | "scheduledRelease" | "description" | "deleted" | "createDate" | "updateDate";
27
27
  export type RadioShowCreationAttributes = Optional<RadioShowAttributes, RadioShowOptionalAttributes>;
28
28
 
29
29
  export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttributes> implements RadioShowAttributes {
30
+ id!: string;
30
31
  creatorUserId!: string;
31
32
  scheduledRelease?: Date;
32
33
  title!: string;
33
34
  description?: string;
34
35
  deleted?: boolean;
35
- id!: string;
36
36
  createDate!: Date;
37
37
  updateDate!: Date;
38
38
 
@@ -140,6 +140,12 @@ export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttri
140
140
 
141
141
  static initModel(sequelize: Sequelize.Sequelize): typeof RadioShow {
142
142
  return RadioShow.init({
143
+ id: {
144
+ type: DataTypes.UUID,
145
+ allowNull: false,
146
+ defaultValue: DataTypes.UUIDV4,
147
+ primaryKey: true
148
+ },
143
149
  creatorUserId: {
144
150
  type: DataTypes.UUID,
145
151
  allowNull: false,
@@ -166,12 +172,6 @@ export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttri
166
172
  type: DataTypes.BOOLEAN,
167
173
  allowNull: true
168
174
  },
169
- id: {
170
- type: DataTypes.UUID,
171
- allowNull: false,
172
- defaultValue: DataTypes.UUIDV4,
173
- primaryKey: true
174
- },
175
175
  createDate: {
176
176
  type: DataTypes.DATE,
177
177
  allowNull: false,
@@ -4,11 +4,11 @@ import type { RadioShow, RadioShowId } from './RadioShow';
4
4
  import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
5
5
 
6
6
  export interface RadioShowMediaAttributes {
7
+ id: string;
7
8
  radioShowId: string;
8
9
  originalMediaType?: number;
9
10
  s3VideoUrl?: string;
10
11
  s3AudioUrl: string;
11
- id: string;
12
12
  createDate: Date;
13
13
  description?: string;
14
14
  cropInstructions?: string;
@@ -25,15 +25,15 @@ export interface RadioShowMediaAttributes {
25
25
 
26
26
  export type RadioShowMediaPk = "id";
27
27
  export type RadioShowMediaId = RadioShowMedia[RadioShowMediaPk];
28
- export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "id" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded" | "automatedModerationApproved" | "automatedModerationRejectionMetadata" | "automatedModerationDecidedAt" | "manualModerationApproved" | "manualModerationDecidedAt" | "manualModerationBy";
28
+ export type RadioShowMediaOptionalAttributes = "id" | "originalMediaType" | "s3VideoUrl" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded" | "automatedModerationApproved" | "automatedModerationRejectionMetadata" | "automatedModerationDecidedAt" | "manualModerationApproved" | "manualModerationDecidedAt" | "manualModerationBy";
29
29
  export type RadioShowMediaCreationAttributes = Optional<RadioShowMediaAttributes, RadioShowMediaOptionalAttributes>;
30
30
 
31
31
  export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMediaCreationAttributes> implements RadioShowMediaAttributes {
32
+ id!: string;
32
33
  radioShowId!: string;
33
34
  originalMediaType?: number;
34
35
  s3VideoUrl?: string;
35
36
  s3AudioUrl!: string;
36
- id!: string;
37
37
  createDate!: Date;
38
38
  description?: string;
39
39
  cropInstructions?: string;
@@ -67,6 +67,12 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
67
67
 
68
68
  static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowMedia {
69
69
  return RadioShowMedia.init({
70
+ id: {
71
+ type: DataTypes.UUID,
72
+ allowNull: false,
73
+ defaultValue: DataTypes.UUIDV4,
74
+ primaryKey: true
75
+ },
70
76
  radioShowId: {
71
77
  type: DataTypes.UUID,
72
78
  allowNull: false,
@@ -91,12 +97,6 @@ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMed
91
97
  allowNull: false,
92
98
  field: 's3_audio_url'
93
99
  },
94
- id: {
95
- type: DataTypes.UUID,
96
- allowNull: false,
97
- defaultValue: DataTypes.UUIDV4,
98
- primaryKey: true
99
- },
100
100
  createDate: {
101
101
  type: DataTypes.DATE,
102
102
  allowNull: false,
@@ -4,29 +4,29 @@ import type { CanonTrack, CanonTrackId } from './CanonTrack';
4
4
  import type { RadioShow, RadioShowId } from './RadioShow';
5
5
 
6
6
  export interface RadioShowPlacementAttributes {
7
+ id: string;
7
8
  radioShowId: string;
8
9
  canonTrackId?: string;
9
10
  radioShowMediaId?: string;
10
11
  seqNum: number;
11
12
  startTime?: string;
12
13
  endTime?: string;
13
- id: string;
14
14
  deleted?: boolean;
15
15
  }
16
16
 
17
17
  export type RadioShowPlacementPk = "id";
18
18
  export type RadioShowPlacementId = RadioShowPlacement[RadioShowPlacementPk];
19
- export type RadioShowPlacementOptionalAttributes = "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "id" | "deleted";
19
+ export type RadioShowPlacementOptionalAttributes = "id" | "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "deleted";
20
20
  export type RadioShowPlacementCreationAttributes = Optional<RadioShowPlacementAttributes, RadioShowPlacementOptionalAttributes>;
21
21
 
22
22
  export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes> implements RadioShowPlacementAttributes {
23
+ id!: string;
23
24
  radioShowId!: string;
24
25
  canonTrackId?: string;
25
26
  radioShowMediaId?: string;
26
27
  seqNum!: number;
27
28
  startTime?: string;
28
29
  endTime?: string;
29
- id!: string;
30
30
  deleted?: boolean;
31
31
 
32
32
  // RadioShowPlacement belongsTo CanonTrack via canonTrackId
@@ -42,6 +42,12 @@ export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, Radi
42
42
 
43
43
  static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPlacement {
44
44
  return RadioShowPlacement.init({
45
+ id: {
46
+ type: DataTypes.UUID,
47
+ allowNull: false,
48
+ defaultValue: DataTypes.UUIDV4,
49
+ primaryKey: true
50
+ },
45
51
  radioShowId: {
46
52
  type: DataTypes.UUID,
47
53
  allowNull: false,
@@ -80,12 +86,6 @@ export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, Radi
80
86
  allowNull: true,
81
87
  field: 'end_time'
82
88
  },
83
- id: {
84
- type: DataTypes.UUID,
85
- allowNull: false,
86
- defaultValue: DataTypes.UUIDV4,
87
- primaryKey: true
88
- },
89
89
  deleted: {
90
90
  type: DataTypes.BOOLEAN,
91
91
  allowNull: true
@@ -3,22 +3,22 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { RadioShow, RadioShowId } from './RadioShow';
4
4
 
5
5
  export interface RadioShowPublishRequestsAttributes {
6
+ id: string;
6
7
  radioShowId: string;
7
8
  approved?: boolean;
8
- id: string;
9
9
  createDate: Date;
10
10
  updateDate: Date;
11
11
  }
12
12
 
13
13
  export type RadioShowPublishRequestsPk = "id";
14
14
  export type RadioShowPublishRequestsId = RadioShowPublishRequests[RadioShowPublishRequestsPk];
15
- export type RadioShowPublishRequestsOptionalAttributes = "approved" | "id" | "createDate" | "updateDate";
15
+ export type RadioShowPublishRequestsOptionalAttributes = "id" | "approved" | "createDate" | "updateDate";
16
16
  export type RadioShowPublishRequestsCreationAttributes = Optional<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsOptionalAttributes>;
17
17
 
18
18
  export class RadioShowPublishRequests extends Model<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsCreationAttributes> implements RadioShowPublishRequestsAttributes {
19
+ id!: string;
19
20
  radioShowId!: string;
20
21
  approved?: boolean;
21
- id!: string;
22
22
  createDate!: Date;
23
23
  updateDate!: Date;
24
24
 
@@ -30,6 +30,12 @@ export class RadioShowPublishRequests extends Model<RadioShowPublishRequestsAttr
30
30
 
31
31
  static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPublishRequests {
32
32
  return RadioShowPublishRequests.init({
33
+ id: {
34
+ type: DataTypes.UUID,
35
+ allowNull: false,
36
+ defaultValue: DataTypes.UUIDV4,
37
+ primaryKey: true
38
+ },
33
39
  radioShowId: {
34
40
  type: DataTypes.UUID,
35
41
  allowNull: false,
@@ -43,12 +49,6 @@ export class RadioShowPublishRequests extends Model<RadioShowPublishRequestsAttr
43
49
  type: DataTypes.BOOLEAN,
44
50
  allowNull: true
45
51
  },
46
- id: {
47
- type: DataTypes.UUID,
48
- allowNull: false,
49
- defaultValue: DataTypes.UUIDV4,
50
- primaryKey: true
51
- },
52
52
  createDate: {
53
53
  type: DataTypes.DATE,
54
54
  allowNull: false,