@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
@@ -4,9 +4,9 @@ import type { MerchItem, MerchItemId } from './MerchItem';
4
4
  import type { MerchOrchestration, MerchOrchestrationId } from './MerchOrchestration';
5
5
 
6
6
  export interface MerchPlatformAttributes {
7
+ id: string;
7
8
  name: string;
8
9
  host: string;
9
- id: string;
10
10
  createDate: Date;
11
11
  updateDate: Date;
12
12
  }
@@ -17,9 +17,9 @@ export type MerchPlatformOptionalAttributes = "id" | "createDate" | "updateDate"
17
17
  export type MerchPlatformCreationAttributes = Optional<MerchPlatformAttributes, MerchPlatformOptionalAttributes>;
18
18
 
19
19
  export class MerchPlatform extends Model<MerchPlatformAttributes, MerchPlatformCreationAttributes> implements MerchPlatformAttributes {
20
+ id!: string;
20
21
  name!: string;
21
22
  host!: string;
22
- id!: string;
23
23
  createDate!: Date;
24
24
  updateDate!: Date;
25
25
 
@@ -50,6 +50,12 @@ export class MerchPlatform extends Model<MerchPlatformAttributes, MerchPlatformC
50
50
 
51
51
  static initModel(sequelize: Sequelize.Sequelize): typeof MerchPlatform {
52
52
  return MerchPlatform.init({
53
+ id: {
54
+ type: DataTypes.UUID,
55
+ allowNull: false,
56
+ defaultValue: DataTypes.UUIDV4,
57
+ primaryKey: true
58
+ },
53
59
  name: {
54
60
  type: DataTypes.TEXT,
55
61
  allowNull: false
@@ -58,12 +64,6 @@ export class MerchPlatform extends Model<MerchPlatformAttributes, MerchPlatformC
58
64
  type: DataTypes.TEXT,
59
65
  allowNull: false
60
66
  },
61
- id: {
62
- type: DataTypes.UUID,
63
- allowNull: false,
64
- defaultValue: DataTypes.UUIDV4,
65
- primaryKey: true
66
- },
67
67
  createDate: {
68
68
  type: DataTypes.DATE,
69
69
  allowNull: false,
@@ -4,8 +4,8 @@ import type { MerchItem, MerchItemId } from './MerchItem';
4
4
  import type { MerchOrchestration, MerchOrchestrationId } from './MerchOrchestration';
5
5
 
6
6
  export interface MerchTypeAttributes {
7
- description: string;
8
7
  id: string;
8
+ description: string;
9
9
  createDate: Date;
10
10
  updateDate: Date;
11
11
  }
@@ -16,8 +16,8 @@ export type MerchTypeOptionalAttributes = "id" | "createDate" | "updateDate";
16
16
  export type MerchTypeCreationAttributes = Optional<MerchTypeAttributes, MerchTypeOptionalAttributes>;
17
17
 
18
18
  export class MerchType extends Model<MerchTypeAttributes, MerchTypeCreationAttributes> implements MerchTypeAttributes {
19
- description!: string;
20
19
  id!: string;
20
+ description!: string;
21
21
  createDate!: Date;
22
22
  updateDate!: Date;
23
23
 
@@ -48,16 +48,16 @@ export class MerchType extends Model<MerchTypeAttributes, MerchTypeCreationAttri
48
48
 
49
49
  static initModel(sequelize: Sequelize.Sequelize): typeof MerchType {
50
50
  return MerchType.init({
51
- description: {
52
- type: DataTypes.TEXT,
53
- allowNull: false
54
- },
55
51
  id: {
56
52
  type: DataTypes.UUID,
57
53
  allowNull: false,
58
54
  defaultValue: DataTypes.UUIDV4,
59
55
  primaryKey: true
60
56
  },
57
+ description: {
58
+ type: DataTypes.TEXT,
59
+ allowNull: false
60
+ },
61
61
  createDate: {
62
62
  type: DataTypes.DATE,
63
63
  allowNull: false,
@@ -4,20 +4,20 @@ import { DataTypes, Model, Optional } from 'sequelize';
4
4
  export interface MetricsDailyAttributes {
5
5
  day?: string;
6
6
  eventType: string;
7
- metrics?: object;
8
7
  createdAt: Date;
9
8
  updatedAt: Date;
9
+ metrics?: object;
10
10
  }
11
11
 
12
- export type MetricsDailyOptionalAttributes = "day" | "metrics" | "createdAt" | "updatedAt";
12
+ export type MetricsDailyOptionalAttributes = "day" | "createdAt" | "updatedAt" | "metrics";
13
13
  export type MetricsDailyCreationAttributes = Optional<MetricsDailyAttributes, MetricsDailyOptionalAttributes>;
14
14
 
15
15
  export class MetricsDaily extends Model<MetricsDailyAttributes, MetricsDailyCreationAttributes> implements MetricsDailyAttributes {
16
16
  day?: string;
17
17
  eventType!: string;
18
- metrics?: object;
19
18
  createdAt!: Date;
20
19
  updatedAt!: Date;
20
+ metrics?: object;
21
21
 
22
22
 
23
23
  static initModel(sequelize: Sequelize.Sequelize): typeof MetricsDaily {
@@ -31,10 +31,6 @@ export class MetricsDaily extends Model<MetricsDailyAttributes, MetricsDailyCrea
31
31
  allowNull: false,
32
32
  field: 'event_type'
33
33
  },
34
- metrics: {
35
- type: DataTypes.JSONB,
36
- allowNull: true
37
- },
38
34
  createdAt: {
39
35
  type: DataTypes.DATE,
40
36
  allowNull: false,
@@ -46,6 +42,10 @@ export class MetricsDaily extends Model<MetricsDailyAttributes, MetricsDailyCrea
46
42
  allowNull: false,
47
43
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
48
44
  field: 'updated_at'
45
+ },
46
+ metrics: {
47
+ type: DataTypes.JSONB,
48
+ allowNull: true
49
49
  }
50
50
  }, {
51
51
  sequelize,
@@ -2,28 +2,34 @@ import * as Sequelize from 'sequelize';
2
2
  import { DataTypes, Model, Optional } from 'sequelize';
3
3
 
4
4
  export interface NewsSiteAttributes {
5
+ id: number;
5
6
  name: string;
6
7
  domain?: string;
7
8
  scrapingBaseUrl: string;
8
- id: number;
9
9
  active?: boolean;
10
10
  }
11
11
 
12
12
  export type NewsSitePk = "id";
13
13
  export type NewsSiteId = NewsSite[NewsSitePk];
14
- export type NewsSiteOptionalAttributes = "domain" | "id" | "active";
14
+ export type NewsSiteOptionalAttributes = "id" | "domain" | "active";
15
15
  export type NewsSiteCreationAttributes = Optional<NewsSiteAttributes, NewsSiteOptionalAttributes>;
16
16
 
17
17
  export class NewsSite extends Model<NewsSiteAttributes, NewsSiteCreationAttributes> implements NewsSiteAttributes {
18
+ id!: number;
18
19
  name!: string;
19
20
  domain?: string;
20
21
  scrapingBaseUrl!: string;
21
- id!: number;
22
22
  active?: boolean;
23
23
 
24
24
 
25
25
  static initModel(sequelize: Sequelize.Sequelize): typeof NewsSite {
26
26
  return NewsSite.init({
27
+ id: {
28
+ autoIncrement: true,
29
+ type: DataTypes.INTEGER,
30
+ allowNull: false,
31
+ primaryKey: true
32
+ },
27
33
  name: {
28
34
  type: DataTypes.STRING(255),
29
35
  allowNull: false,
@@ -38,12 +44,6 @@ export class NewsSite extends Model<NewsSiteAttributes, NewsSiteCreationAttribut
38
44
  allowNull: false,
39
45
  field: 'scraping_base_url'
40
46
  },
41
- id: {
42
- autoIncrement: true,
43
- type: DataTypes.INTEGER,
44
- allowNull: false,
45
- primaryKey: true
46
- },
47
47
  active: {
48
48
  type: DataTypes.BOOLEAN,
49
49
  allowNull: true,
@@ -5,46 +5,46 @@ import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
5
5
  import type { NotificationType, NotificationTypeId } from './NotificationType';
6
6
 
7
7
  export interface NotificationAttributes {
8
+ id: string;
8
9
  targetUserId: string;
9
10
  notificationTypeId: number;
10
11
  metadata?: object;
12
+ isRead: boolean;
11
13
  readAt?: Date;
14
+ isDismissed: boolean;
12
15
  dismissedAt?: Date;
13
16
  sourceUserId?: string;
14
17
  jukeboxSessionId?: string;
15
- expiresAt?: Date;
16
- pushSentAt?: Date;
17
- pushError?: string;
18
- id: string;
19
- isRead: boolean;
20
- isDismissed: boolean;
21
18
  createdAt: Date;
22
19
  updatedAt: Date;
20
+ expiresAt?: Date;
23
21
  pushSent: boolean;
22
+ pushSentAt?: Date;
23
+ pushError?: string;
24
24
  }
25
25
 
26
26
  export type NotificationPk = "id";
27
27
  export type NotificationId = Notification[NotificationPk];
28
- export type NotificationOptionalAttributes = "metadata" | "readAt" | "dismissedAt" | "sourceUserId" | "jukeboxSessionId" | "expiresAt" | "pushSentAt" | "pushError" | "id" | "createdAt" | "updatedAt";
28
+ export type NotificationOptionalAttributes = "id" | "metadata" | "readAt" | "dismissedAt" | "sourceUserId" | "jukeboxSessionId" | "createdAt" | "updatedAt" | "expiresAt" | "pushSentAt" | "pushError";
29
29
  export type NotificationCreationAttributes = Optional<NotificationAttributes, NotificationOptionalAttributes>;
30
30
 
31
31
  export class Notification extends Model<NotificationAttributes, NotificationCreationAttributes> implements NotificationAttributes {
32
+ id!: string;
32
33
  targetUserId!: string;
33
34
  notificationTypeId!: number;
34
35
  metadata?: object;
36
+ isRead!: boolean;
35
37
  readAt?: Date;
38
+ isDismissed!: boolean;
36
39
  dismissedAt?: Date;
37
40
  sourceUserId?: string;
38
41
  jukeboxSessionId?: string;
39
- expiresAt?: Date;
40
- pushSentAt?: Date;
41
- pushError?: string;
42
- id!: string;
43
- isRead!: boolean;
44
- isDismissed!: boolean;
45
42
  createdAt!: Date;
46
43
  updatedAt!: Date;
44
+ expiresAt?: Date;
47
45
  pushSent!: boolean;
46
+ pushSentAt?: Date;
47
+ pushError?: string;
48
48
 
49
49
  // Notification belongsTo AppUser via sourceUserId
50
50
  sourceUser!: AppUser;
@@ -69,6 +69,12 @@ export class Notification extends Model<NotificationAttributes, NotificationCrea
69
69
 
70
70
  static initModel(sequelize: Sequelize.Sequelize): typeof Notification {
71
71
  return Notification.init({
72
+ id: {
73
+ type: DataTypes.UUID,
74
+ allowNull: false,
75
+ defaultValue: DataTypes.UUIDV4,
76
+ primaryKey: true
77
+ },
72
78
  targetUserId: {
73
79
  type: DataTypes.UUID,
74
80
  allowNull: false,
@@ -91,11 +97,23 @@ export class Notification extends Model<NotificationAttributes, NotificationCrea
91
97
  type: DataTypes.JSONB,
92
98
  allowNull: true
93
99
  },
100
+ isRead: {
101
+ type: DataTypes.BOOLEAN,
102
+ allowNull: false,
103
+ defaultValue: false,
104
+ field: 'is_read'
105
+ },
94
106
  readAt: {
95
107
  type: DataTypes.DATE,
96
108
  allowNull: true,
97
109
  field: 'read_at'
98
110
  },
111
+ isDismissed: {
112
+ type: DataTypes.BOOLEAN,
113
+ allowNull: false,
114
+ defaultValue: false,
115
+ field: 'is_dismissed'
116
+ },
99
117
  dismissedAt: {
100
118
  type: DataTypes.DATE,
101
119
  allowNull: true,
@@ -119,39 +137,6 @@ export class Notification extends Model<NotificationAttributes, NotificationCrea
119
137
  },
120
138
  field: 'jukebox_session_id'
121
139
  },
122
- expiresAt: {
123
- type: DataTypes.DATE,
124
- allowNull: true,
125
- field: 'expires_at'
126
- },
127
- pushSentAt: {
128
- type: DataTypes.DATE,
129
- allowNull: true,
130
- field: 'push_sent_at'
131
- },
132
- pushError: {
133
- type: DataTypes.TEXT,
134
- allowNull: true,
135
- field: 'push_error'
136
- },
137
- id: {
138
- type: DataTypes.UUID,
139
- allowNull: false,
140
- defaultValue: DataTypes.UUIDV4,
141
- primaryKey: true
142
- },
143
- isRead: {
144
- type: DataTypes.BOOLEAN,
145
- allowNull: false,
146
- defaultValue: false,
147
- field: 'is_read'
148
- },
149
- isDismissed: {
150
- type: DataTypes.BOOLEAN,
151
- allowNull: false,
152
- defaultValue: false,
153
- field: 'is_dismissed'
154
- },
155
140
  createdAt: {
156
141
  type: DataTypes.DATE,
157
142
  allowNull: false,
@@ -164,11 +149,26 @@ export class Notification extends Model<NotificationAttributes, NotificationCrea
164
149
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
165
150
  field: 'updated_at'
166
151
  },
152
+ expiresAt: {
153
+ type: DataTypes.DATE,
154
+ allowNull: true,
155
+ field: 'expires_at'
156
+ },
167
157
  pushSent: {
168
158
  type: DataTypes.BOOLEAN,
169
159
  allowNull: false,
170
160
  defaultValue: false,
171
161
  field: 'push_sent'
162
+ },
163
+ pushSentAt: {
164
+ type: DataTypes.DATE,
165
+ allowNull: true,
166
+ field: 'push_sent_at'
167
+ },
168
+ pushError: {
169
+ type: DataTypes.TEXT,
170
+ allowNull: true,
171
+ field: 'push_error'
172
172
  }
173
173
  }, {
174
174
  sequelize,
@@ -11,10 +11,10 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
11
11
  import type { UnmatchedArtist, UnmatchedArtistId } from './UnmatchedArtist';
12
12
 
13
13
  export interface PlatformAttributes {
14
+ id: number;
14
15
  name: string;
15
16
  createDate: Date;
16
17
  updateDate: Date;
17
- id: number;
18
18
  }
19
19
 
20
20
  export type PlatformPk = "id";
@@ -23,10 +23,10 @@ export type PlatformOptionalAttributes = "createDate" | "updateDate";
23
23
  export type PlatformCreationAttributes = Optional<PlatformAttributes, PlatformOptionalAttributes>;
24
24
 
25
25
  export class Platform extends Model<PlatformAttributes, PlatformCreationAttributes> implements PlatformAttributes {
26
+ id!: number;
26
27
  name!: string;
27
28
  createDate!: Date;
28
29
  updateDate!: Date;
29
- id!: number;
30
30
 
31
31
  // Platform hasMany AppUserPlatformRelation via platformId
32
32
  appUserPlatformRelations!: AppUserPlatformRelation[];
@@ -139,6 +139,13 @@ export class Platform extends Model<PlatformAttributes, PlatformCreationAttribut
139
139
 
140
140
  static initModel(sequelize: Sequelize.Sequelize): typeof Platform {
141
141
  return Platform.init({
142
+ id: {
143
+ autoIncrement: true,
144
+ autoIncrementIdentity: true,
145
+ type: DataTypes.SMALLINT,
146
+ allowNull: false,
147
+ primaryKey: true
148
+ },
142
149
  name: {
143
150
  type: DataTypes.TEXT,
144
151
  allowNull: false,
@@ -155,13 +162,6 @@ export class Platform extends Model<PlatformAttributes, PlatformCreationAttribut
155
162
  allowNull: false,
156
163
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
157
164
  field: 'update_date'
158
- },
159
- id: {
160
- autoIncrement: true,
161
- autoIncrementIdentity: true,
162
- type: DataTypes.SMALLINT,
163
- allowNull: false,
164
- primaryKey: true
165
165
  }
166
166
  }, {
167
167
  sequelize,
@@ -22,6 +22,7 @@ import type { VersusOption, VersusOptionId } from './VersusOption';
22
22
  import type { VersusPublishIssue, VersusPublishIssueId } from './VersusPublishIssue';
23
23
 
24
24
  export interface PlatformAlbumAttributes {
25
+ id: string;
25
26
  platformId: number;
26
27
  externalAlbumId: string;
27
28
  name: string;
@@ -30,20 +31,20 @@ export interface PlatformAlbumAttributes {
30
31
  releaseDate?: string;
31
32
  popularity?: number;
32
33
  recordLabel?: string;
33
- images?: object;
34
- id: string;
35
34
  createDate: Date;
36
35
  updateDate: Date;
36
+ images?: object;
37
37
  lastHarvestDate?: Date;
38
38
  lastHarvestLog?: string;
39
39
  }
40
40
 
41
41
  export type PlatformAlbumPk = "id";
42
42
  export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
43
- export type PlatformAlbumOptionalAttributes = "albumType" | "releaseDate" | "popularity" | "recordLabel" | "images" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
43
+ export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images" | "lastHarvestDate" | "lastHarvestLog";
44
44
  export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
45
45
 
46
46
  export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
47
+ id!: string;
47
48
  platformId!: number;
48
49
  externalAlbumId!: string;
49
50
  name!: string;
@@ -52,10 +53,9 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
52
53
  releaseDate?: string;
53
54
  popularity?: number;
54
55
  recordLabel?: string;
55
- images?: object;
56
- id!: string;
57
56
  createDate!: Date;
58
57
  updateDate!: Date;
58
+ images?: object;
59
59
  lastHarvestDate?: Date;
60
60
  lastHarvestLog?: string;
61
61
 
@@ -295,6 +295,12 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
295
295
 
296
296
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformAlbum {
297
297
  return PlatformAlbum.init({
298
+ id: {
299
+ type: DataTypes.UUID,
300
+ allowNull: false,
301
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
302
+ primaryKey: true
303
+ },
298
304
  platformId: {
299
305
  type: DataTypes.SMALLINT,
300
306
  allowNull: false,
@@ -339,16 +345,6 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
339
345
  allowNull: true,
340
346
  field: 'record_label'
341
347
  },
342
- images: {
343
- type: DataTypes.JSONB,
344
- allowNull: true
345
- },
346
- id: {
347
- type: DataTypes.UUID,
348
- allowNull: false,
349
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
350
- primaryKey: true
351
- },
352
348
  createDate: {
353
349
  type: DataTypes.DATE,
354
350
  allowNull: false,
@@ -361,6 +357,10 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
361
357
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
362
358
  field: 'update_date'
363
359
  },
360
+ images: {
361
+ type: DataTypes.JSONB,
362
+ allowNull: true
363
+ },
364
364
  lastHarvestDate: {
365
365
  type: DataTypes.DATE,
366
366
  allowNull: true,
@@ -20,15 +20,15 @@ import type { VersusOption, VersusOptionId } from './VersusOption';
20
20
  import type { VersusPublishIssue, VersusPublishIssueId } from './VersusPublishIssue';
21
21
 
22
22
  export interface PlatformArtistAttributes {
23
+ id: string;
23
24
  externalArtistId: string;
24
25
  platformId: number;
25
26
  name: string;
26
27
  asciiName: string;
27
28
  externalUri?: string;
28
- genres?: string[];
29
- id: string;
30
29
  createDate: Date;
31
30
  updateDate: Date;
31
+ genres?: string[];
32
32
  lastHarvestDate?: Date;
33
33
  lastHarvestLog?: string;
34
34
  images?: object;
@@ -36,19 +36,19 @@ export interface PlatformArtistAttributes {
36
36
 
37
37
  export type PlatformArtistPk = "id";
38
38
  export type PlatformArtistId = PlatformArtist[PlatformArtistPk];
39
- export type PlatformArtistOptionalAttributes = "externalUri" | "genres" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog" | "images";
39
+ export type PlatformArtistOptionalAttributes = "id" | "externalUri" | "createDate" | "updateDate" | "genres" | "lastHarvestDate" | "lastHarvestLog" | "images";
40
40
  export type PlatformArtistCreationAttributes = Optional<PlatformArtistAttributes, PlatformArtistOptionalAttributes>;
41
41
 
42
42
  export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArtistCreationAttributes> implements PlatformArtistAttributes {
43
+ id!: string;
43
44
  externalArtistId!: string;
44
45
  platformId!: number;
45
46
  name!: string;
46
47
  asciiName!: string;
47
48
  externalUri?: string;
48
- genres?: string[];
49
- id!: string;
50
49
  createDate!: Date;
51
50
  updateDate!: Date;
51
+ genres?: string[];
52
52
  lastHarvestDate?: Date;
53
53
  lastHarvestLog?: string;
54
54
  images?: object;
@@ -265,6 +265,12 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
265
265
 
266
266
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtist {
267
267
  return PlatformArtist.init({
268
+ id: {
269
+ type: DataTypes.UUID,
270
+ allowNull: false,
271
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
272
+ primaryKey: true
273
+ },
268
274
  externalArtistId: {
269
275
  type: DataTypes.TEXT,
270
276
  allowNull: false,
@@ -295,16 +301,6 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
295
301
  allowNull: true,
296
302
  field: 'external_uri'
297
303
  },
298
- genres: {
299
- type: DataTypes.ARRAY(DataTypes.TEXT),
300
- allowNull: true
301
- },
302
- id: {
303
- type: DataTypes.UUID,
304
- allowNull: false,
305
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
306
- primaryKey: true
307
- },
308
304
  createDate: {
309
305
  type: DataTypes.DATE,
310
306
  allowNull: false,
@@ -317,6 +313,10 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
317
313
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
318
314
  field: 'update_date'
319
315
  },
316
+ genres: {
317
+ type: DataTypes.ARRAY(DataTypes.TEXT),
318
+ allowNull: true
319
+ },
320
320
  lastHarvestDate: {
321
321
  type: DataTypes.DATE,
322
322
  allowNull: true,
@@ -11,9 +11,9 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
11
11
  import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from './PlatformTrackGenreRelation';
12
12
 
13
13
  export interface PlatformGenreAttributes {
14
+ id: string;
14
15
  platformId: number;
15
16
  name: string;
16
- id: string;
17
17
  createDate: Date;
18
18
  updateDate: Date;
19
19
  }
@@ -24,9 +24,9 @@ export type PlatformGenreOptionalAttributes = "id" | "createDate" | "updateDate"
24
24
  export type PlatformGenreCreationAttributes = Optional<PlatformGenreAttributes, PlatformGenreOptionalAttributes>;
25
25
 
26
26
  export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreCreationAttributes> implements PlatformGenreAttributes {
27
+ id!: string;
27
28
  platformId!: number;
28
29
  name!: string;
29
- id!: string;
30
30
  createDate!: Date;
31
31
  updateDate!: Date;
32
32
 
@@ -134,6 +134,12 @@ export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreC
134
134
 
135
135
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformGenre {
136
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
+ },
137
143
  platformId: {
138
144
  type: DataTypes.SMALLINT,
139
145
  allowNull: false,
@@ -149,12 +155,6 @@ export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreC
149
155
  allowNull: false,
150
156
  unique: "platform_genre_name_pkey"
151
157
  },
152
- id: {
153
- type: DataTypes.UUID,
154
- allowNull: false,
155
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
156
- primaryKey: true
157
- },
158
158
  createDate: {
159
159
  type: DataTypes.DATE,
160
160
  allowNull: false,
@@ -17,6 +17,7 @@ import type { VersusOption, VersusOptionId } from './VersusOption';
17
17
  import type { VersusPublishIssue, VersusPublishIssueId } from './VersusPublishIssue';
18
18
 
19
19
  export interface PlatformTrackAttributes {
20
+ id: string;
20
21
  platformId: number;
21
22
  externalTrackId: string;
22
23
  name: string;
@@ -26,7 +27,6 @@ export interface PlatformTrackAttributes {
26
27
  popularity?: number;
27
28
  discNumber?: number;
28
29
  discTrackNumber?: number;
29
- id: string;
30
30
  createDate: Date;
31
31
  updateDate: Date;
32
32
  lastHarvestDate?: Date;
@@ -35,10 +35,11 @@ export interface PlatformTrackAttributes {
35
35
 
36
36
  export type PlatformTrackPk = "id";
37
37
  export type PlatformTrackId = PlatformTrack[PlatformTrackPk];
38
- export type PlatformTrackOptionalAttributes = "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
38
+ export type PlatformTrackOptionalAttributes = "id" | "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
39
39
  export type PlatformTrackCreationAttributes = Optional<PlatformTrackAttributes, PlatformTrackOptionalAttributes>;
40
40
 
41
41
  export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackCreationAttributes> implements PlatformTrackAttributes {
42
+ id!: string;
42
43
  platformId!: number;
43
44
  externalTrackId!: string;
44
45
  name!: string;
@@ -48,7 +49,6 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
48
49
  popularity?: number;
49
50
  discNumber?: number;
50
51
  discTrackNumber?: number;
51
- id!: string;
52
52
  createDate!: Date;
53
53
  updateDate!: Date;
54
54
  lastHarvestDate?: Date;
@@ -230,6 +230,12 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
230
230
 
231
231
  static initModel(sequelize: Sequelize.Sequelize): typeof PlatformTrack {
232
232
  return PlatformTrack.init({
233
+ id: {
234
+ type: DataTypes.UUID,
235
+ allowNull: false,
236
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
237
+ primaryKey: true
238
+ },
233
239
  platformId: {
234
240
  type: DataTypes.SMALLINT,
235
241
  allowNull: false,
@@ -278,12 +284,6 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
278
284
  allowNull: true,
279
285
  field: 'disc_track_number'
280
286
  },
281
- id: {
282
- type: DataTypes.UUID,
283
- allowNull: false,
284
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
285
- primaryKey: true
286
- },
287
287
  createDate: {
288
288
  type: DataTypes.DATE,
289
289
  allowNull: false,