@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
package/models/State.ts CHANGED
@@ -5,8 +5,8 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
5
5
  import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
6
 
7
7
  export interface StateAttributes {
8
- description: string;
9
8
  id: number;
9
+ description: string;
10
10
  }
11
11
 
12
12
  export type StatePk = "id";
@@ -14,8 +14,8 @@ export type StateId = State[StatePk];
14
14
  export type StateCreationAttributes = StateAttributes;
15
15
 
16
16
  export class State extends Model<StateAttributes, StateCreationAttributes> implements StateAttributes {
17
- description!: string;
18
17
  id!: number;
18
+ description!: string;
19
19
 
20
20
  // State hasMany AppUser via stateId
21
21
  appUsers!: AppUser[];
@@ -56,16 +56,16 @@ export class State extends Model<StateAttributes, StateCreationAttributes> imple
56
56
 
57
57
  static initModel(sequelize: Sequelize.Sequelize): typeof State {
58
58
  return State.init({
59
- description: {
60
- type: DataTypes.TEXT,
61
- allowNull: false
62
- },
63
59
  id: {
64
60
  autoIncrement: true,
65
61
  autoIncrementIdentity: true,
66
62
  type: DataTypes.SMALLINT,
67
63
  allowNull: false,
68
64
  primaryKey: true
65
+ },
66
+ description: {
67
+ type: DataTypes.TEXT,
68
+ allowNull: false
69
69
  }
70
70
  }, {
71
71
  sequelize,
@@ -3,8 +3,8 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
4
 
5
5
  export interface UnmatchedAlbumAttributes {
6
- platformAlbumId: string;
7
6
  id: string;
7
+ platformAlbumId: string;
8
8
  createDate: Date;
9
9
  }
10
10
 
@@ -14,8 +14,8 @@ export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
14
14
  export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
15
15
 
16
16
  export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
17
- platformAlbumId!: string;
18
17
  id!: string;
18
+ platformAlbumId!: string;
19
19
  createDate!: Date;
20
20
 
21
21
  // UnmatchedAlbum belongsTo PlatformAlbum via platformAlbumId
@@ -26,6 +26,12 @@ export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlb
26
26
 
27
27
  static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedAlbum {
28
28
  return UnmatchedAlbum.init({
29
+ id: {
30
+ type: DataTypes.UUID,
31
+ allowNull: false,
32
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
33
+ primaryKey: true
34
+ },
29
35
  platformAlbumId: {
30
36
  type: DataTypes.UUID,
31
37
  allowNull: false,
@@ -35,12 +41,6 @@ export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlb
35
41
  },
36
42
  field: 'platform_album_id'
37
43
  },
38
- id: {
39
- type: DataTypes.UUID,
40
- allowNull: false,
41
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
42
- primaryKey: true
43
- },
44
44
  createDate: {
45
45
  type: DataTypes.DATE,
46
46
  allowNull: false,
@@ -3,9 +3,9 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { Platform, PlatformId } from './Platform';
4
4
 
5
5
  export interface UnmatchedArtistAttributes {
6
+ id: string;
6
7
  platformId: number;
7
8
  externalArtistId: number;
8
- id: string;
9
9
  createDate: Date;
10
10
  updateDate: Date;
11
11
  }
@@ -16,9 +16,9 @@ export type UnmatchedArtistOptionalAttributes = "id" | "createDate" | "updateDat
16
16
  export type UnmatchedArtistCreationAttributes = Optional<UnmatchedArtistAttributes, UnmatchedArtistOptionalAttributes>;
17
17
 
18
18
  export class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes> implements UnmatchedArtistAttributes {
19
+ id!: string;
19
20
  platformId!: number;
20
21
  externalArtistId!: number;
21
- id!: string;
22
22
  createDate!: Date;
23
23
  updateDate!: Date;
24
24
 
@@ -30,6 +30,12 @@ export class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedA
30
30
 
31
31
  static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedArtist {
32
32
  return UnmatchedArtist.init({
33
+ id: {
34
+ type: DataTypes.UUID,
35
+ allowNull: false,
36
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
37
+ primaryKey: true
38
+ },
33
39
  platformId: {
34
40
  type: DataTypes.SMALLINT,
35
41
  allowNull: false,
@@ -44,12 +50,6 @@ export class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedA
44
50
  allowNull: false,
45
51
  field: 'external_artist_id'
46
52
  },
47
- id: {
48
- type: DataTypes.UUID,
49
- allowNull: false,
50
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
51
- primaryKey: true
52
- },
53
53
  createDate: {
54
54
  type: DataTypes.DATE,
55
55
  allowNull: false,
@@ -9,7 +9,10 @@ import type { UserComments, UserCommentsId } from './UserComments';
9
9
  import type { UserMessages, UserMessagesId } from './UserMessages';
10
10
 
11
11
  export interface UserAbuseReportsAttributes {
12
+ id: string;
12
13
  reporterUserId: string;
14
+ reportDate: Date;
15
+ updateDate: Date;
13
16
  jukeboxId?: string;
14
17
  jukeboxChatMessageId?: string;
15
18
  radioShowId?: string;
@@ -18,18 +21,18 @@ export interface UserAbuseReportsAttributes {
18
21
  versusThemeTextId?: string;
19
22
  commentId?: string;
20
23
  directMessageId?: string;
21
- id: string;
22
- reportDate: Date;
23
- updateDate: Date;
24
24
  }
25
25
 
26
26
  export type UserAbuseReportsPk = "id";
27
27
  export type UserAbuseReportsId = UserAbuseReports[UserAbuseReportsPk];
28
- export type UserAbuseReportsOptionalAttributes = "jukeboxId" | "jukeboxChatMessageId" | "radioShowId" | "radioShowMediaId" | "playlistId" | "versusThemeTextId" | "commentId" | "directMessageId" | "id" | "reportDate" | "updateDate";
28
+ export type UserAbuseReportsOptionalAttributes = "id" | "reportDate" | "updateDate" | "jukeboxId" | "jukeboxChatMessageId" | "radioShowId" | "radioShowMediaId" | "playlistId" | "versusThemeTextId" | "commentId" | "directMessageId";
29
29
  export type UserAbuseReportsCreationAttributes = Optional<UserAbuseReportsAttributes, UserAbuseReportsOptionalAttributes>;
30
30
 
31
31
  export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbuseReportsCreationAttributes> implements UserAbuseReportsAttributes {
32
+ id!: string;
32
33
  reporterUserId!: string;
34
+ reportDate!: Date;
35
+ updateDate!: Date;
33
36
  jukeboxId?: string;
34
37
  jukeboxChatMessageId?: string;
35
38
  radioShowId?: string;
@@ -38,9 +41,6 @@ export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbus
38
41
  versusThemeTextId?: string;
39
42
  commentId?: string;
40
43
  directMessageId?: string;
41
- id!: string;
42
- reportDate!: Date;
43
- updateDate!: Date;
44
44
 
45
45
  // UserAbuseReports belongsTo AppUser via reporterUserId
46
46
  reporterUser!: AppUser;
@@ -80,6 +80,12 @@ export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbus
80
80
 
81
81
  static initModel(sequelize: Sequelize.Sequelize): typeof UserAbuseReports {
82
82
  return UserAbuseReports.init({
83
+ id: {
84
+ type: DataTypes.UUID,
85
+ allowNull: false,
86
+ defaultValue: DataTypes.UUIDV4,
87
+ primaryKey: true
88
+ },
83
89
  reporterUserId: {
84
90
  type: DataTypes.UUID,
85
91
  allowNull: false,
@@ -89,6 +95,18 @@ export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbus
89
95
  },
90
96
  field: 'reporter_user_id'
91
97
  },
98
+ reportDate: {
99
+ type: DataTypes.DATE,
100
+ allowNull: false,
101
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
102
+ field: 'report_date'
103
+ },
104
+ updateDate: {
105
+ type: DataTypes.DATE,
106
+ allowNull: false,
107
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
108
+ field: 'update_date'
109
+ },
92
110
  jukeboxId: {
93
111
  type: DataTypes.UUID,
94
112
  allowNull: true,
@@ -152,24 +170,6 @@ export class UserAbuseReports extends Model<UserAbuseReportsAttributes, UserAbus
152
170
  key: 'id'
153
171
  },
154
172
  field: 'direct_message_id'
155
- },
156
- id: {
157
- type: DataTypes.UUID,
158
- allowNull: false,
159
- defaultValue: DataTypes.UUIDV4,
160
- primaryKey: true
161
- },
162
- reportDate: {
163
- type: DataTypes.DATE,
164
- allowNull: false,
165
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
166
- field: 'report_date'
167
- },
168
- updateDate: {
169
- type: DataTypes.DATE,
170
- allowNull: false,
171
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
172
- field: 'update_date'
173
173
  }
174
174
  }, {
175
175
  sequelize,
@@ -4,10 +4,10 @@ import type { AffinityRelationshipType, AffinityRelationshipTypeId } from './Aff
4
4
  import type { AppUser, AppUserId } from './AppUser';
5
5
 
6
6
  export interface UserAffinityAttributes {
7
+ id: string;
7
8
  userId: string;
8
9
  affinityRelationshipTypeId: string;
9
10
  relatedId: string;
10
- id: string;
11
11
  createDate?: Date;
12
12
  updateDate?: Date;
13
13
  }
@@ -18,10 +18,10 @@ export type UserAffinityOptionalAttributes = "id" | "createDate" | "updateDate";
18
18
  export type UserAffinityCreationAttributes = Optional<UserAffinityAttributes, UserAffinityOptionalAttributes>;
19
19
 
20
20
  export class UserAffinity extends Model<UserAffinityAttributes, UserAffinityCreationAttributes> implements UserAffinityAttributes {
21
+ id!: string;
21
22
  userId!: string;
22
23
  affinityRelationshipTypeId!: string;
23
24
  relatedId!: string;
24
- id!: string;
25
25
  createDate?: Date;
26
26
  updateDate?: Date;
27
27
 
@@ -38,6 +38,12 @@ export class UserAffinity extends Model<UserAffinityAttributes, UserAffinityCrea
38
38
 
39
39
  static initModel(sequelize: Sequelize.Sequelize): typeof UserAffinity {
40
40
  return UserAffinity.init({
41
+ id: {
42
+ type: DataTypes.UUID,
43
+ allowNull: false,
44
+ defaultValue: DataTypes.UUIDV4,
45
+ primaryKey: true
46
+ },
41
47
  userId: {
42
48
  type: DataTypes.UUID,
43
49
  allowNull: false,
@@ -64,12 +70,6 @@ export class UserAffinity extends Model<UserAffinityAttributes, UserAffinityCrea
64
70
  unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
65
71
  field: 'related_id'
66
72
  },
67
- id: {
68
- type: DataTypes.UUID,
69
- allowNull: false,
70
- defaultValue: DataTypes.UUIDV4,
71
- primaryKey: true
72
- },
73
73
  createDate: {
74
74
  type: DataTypes.DATE,
75
75
  allowNull: true,
@@ -5,11 +5,11 @@ import type { AppUser, AppUserId } from './AppUser';
5
5
  import type { CanonArtist, CanonArtistId } from './CanonArtist';
6
6
 
7
7
  export interface UserArtistAffinityAttributes {
8
+ id: string;
8
9
  userId: string;
9
10
  canonArtistId: 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 UserArtistAffinityOptionalAttributes = "id" | "createdAt" | "updated
20
20
  export type UserArtistAffinityCreationAttributes = Optional<UserArtistAffinityAttributes, UserArtistAffinityOptionalAttributes>;
21
21
 
22
22
  export class UserArtistAffinity extends Model<UserArtistAffinityAttributes, UserArtistAffinityCreationAttributes> implements UserArtistAffinityAttributes {
23
+ id!: string;
23
24
  userId!: string;
24
25
  canonArtistId!: 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 UserArtistAffinity extends Model<UserArtistAffinityAttributes, User
46
46
 
47
47
  static initModel(sequelize: Sequelize.Sequelize): typeof UserArtistAffinity {
48
48
  return UserArtistAffinity.init({
49
+ id: {
50
+ type: DataTypes.UUID,
51
+ allowNull: false,
52
+ defaultValue: DataTypes.UUIDV4,
53
+ primaryKey: true
54
+ },
49
55
  userId: {
50
56
  type: DataTypes.UUID,
51
57
  allowNull: false,
@@ -79,12 +85,6 @@ export class UserArtistAffinity extends Model<UserArtistAffinityAttributes, User
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,
@@ -8,30 +8,30 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
8
8
  import type { RadioShow, RadioShowId } from './RadioShow';
9
9
 
10
10
  export interface UserBookmarksAttributes {
11
+ id: string;
11
12
  appUserId: string;
12
13
  jukeboxId?: string;
13
14
  playlistId?: string;
14
15
  radioShowId?: string;
15
16
  merchItemId?: string;
16
17
  newsArticleId?: string;
17
- id: string;
18
18
  createDate: Date;
19
19
  updateDate: Date;
20
20
  }
21
21
 
22
22
  export type UserBookmarksPk = "id";
23
23
  export type UserBookmarksId = UserBookmarks[UserBookmarksPk];
24
- export type UserBookmarksOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "merchItemId" | "newsArticleId" | "id" | "createDate" | "updateDate";
24
+ export type UserBookmarksOptionalAttributes = "id" | "jukeboxId" | "playlistId" | "radioShowId" | "merchItemId" | "newsArticleId" | "createDate" | "updateDate";
25
25
  export type UserBookmarksCreationAttributes = Optional<UserBookmarksAttributes, UserBookmarksOptionalAttributes>;
26
26
 
27
27
  export class UserBookmarks extends Model<UserBookmarksAttributes, UserBookmarksCreationAttributes> implements UserBookmarksAttributes {
28
+ id!: string;
28
29
  appUserId!: string;
29
30
  jukeboxId?: string;
30
31
  playlistId?: string;
31
32
  radioShowId?: string;
32
33
  merchItemId?: string;
33
34
  newsArticleId?: string;
34
- id!: string;
35
35
  createDate!: Date;
36
36
  updateDate!: Date;
37
37
 
@@ -68,6 +68,12 @@ export class UserBookmarks extends Model<UserBookmarksAttributes, UserBookmarksC
68
68
 
69
69
  static initModel(sequelize: Sequelize.Sequelize): typeof UserBookmarks {
70
70
  return UserBookmarks.init({
71
+ id: {
72
+ type: DataTypes.UUID,
73
+ allowNull: false,
74
+ defaultValue: DataTypes.UUIDV4,
75
+ primaryKey: true
76
+ },
71
77
  appUserId: {
72
78
  type: DataTypes.UUID,
73
79
  allowNull: false,
@@ -122,12 +128,6 @@ export class UserBookmarks extends Model<UserBookmarksAttributes, UserBookmarksC
122
128
  },
123
129
  field: 'news_article_id'
124
130
  },
125
- id: {
126
- type: DataTypes.UUID,
127
- allowNull: false,
128
- defaultValue: DataTypes.UUIDV4,
129
- primaryKey: true
130
- },
131
131
  createDate: {
132
132
  type: DataTypes.DATE,
133
133
  allowNull: false,
@@ -9,12 +9,12 @@ import type { RadioShow, RadioShowId } from './RadioShow';
9
9
  import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
10
10
 
11
11
  export interface UserCommentsAttributes {
12
+ id: string;
12
13
  appUserId: string;
13
14
  jukeboxId?: string;
14
15
  playlistId?: string;
15
16
  radioShowId?: string;
16
17
  comment: string;
17
- id: string;
18
18
  replyCommentId?: string;
19
19
  deleted: boolean;
20
20
  createDate: Date;
@@ -23,22 +23,22 @@ export interface UserCommentsAttributes {
23
23
  moderationScore?: number;
24
24
  moderationLevel?: string;
25
25
  strippedUrls?: object;
26
- newsArticleId?: string;
27
26
  merchItemId?: string;
27
+ newsArticleId?: string;
28
28
  }
29
29
 
30
30
  export type UserCommentsPk = "id";
31
31
  export type UserCommentsId = UserComments[UserCommentsPk];
32
- export type UserCommentsOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "replyCommentId" | "createDate" | "updateDate" | "modifiedComment" | "moderationScore" | "moderationLevel" | "strippedUrls" | "newsArticleId" | "merchItemId";
32
+ export type UserCommentsOptionalAttributes = "id" | "jukeboxId" | "playlistId" | "radioShowId" | "replyCommentId" | "createDate" | "updateDate" | "modifiedComment" | "moderationScore" | "moderationLevel" | "strippedUrls" | "merchItemId" | "newsArticleId";
33
33
  export type UserCommentsCreationAttributes = Optional<UserCommentsAttributes, UserCommentsOptionalAttributes>;
34
34
 
35
35
  export class UserComments extends Model<UserCommentsAttributes, UserCommentsCreationAttributes> implements UserCommentsAttributes {
36
+ id!: string;
36
37
  appUserId!: string;
37
38
  jukeboxId?: string;
38
39
  playlistId?: string;
39
40
  radioShowId?: string;
40
41
  comment!: string;
41
- id!: string;
42
42
  replyCommentId?: string;
43
43
  deleted!: boolean;
44
44
  createDate!: Date;
@@ -47,8 +47,8 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
47
47
  moderationScore?: number;
48
48
  moderationLevel?: string;
49
49
  strippedUrls?: object;
50
- newsArticleId?: string;
51
50
  merchItemId?: string;
51
+ newsArticleId?: string;
52
52
 
53
53
  // UserComments belongsTo AppUser via appUserId
54
54
  appUser!: AppUser;
@@ -100,6 +100,12 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
100
100
 
101
101
  static initModel(sequelize: Sequelize.Sequelize): typeof UserComments {
102
102
  return UserComments.init({
103
+ id: {
104
+ type: DataTypes.UUID,
105
+ allowNull: false,
106
+ defaultValue: DataTypes.UUIDV4,
107
+ primaryKey: true
108
+ },
103
109
  appUserId: {
104
110
  type: DataTypes.UUID,
105
111
  allowNull: false,
@@ -140,12 +146,6 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
140
146
  type: DataTypes.STRING(1000),
141
147
  allowNull: false
142
148
  },
143
- id: {
144
- type: DataTypes.UUID,
145
- allowNull: false,
146
- defaultValue: DataTypes.UUIDV4,
147
- primaryKey: true
148
- },
149
149
  replyCommentId: {
150
150
  type: DataTypes.UUID,
151
151
  allowNull: true,
@@ -192,23 +192,23 @@ export class UserComments extends Model<UserCommentsAttributes, UserCommentsCrea
192
192
  allowNull: true,
193
193
  field: 'stripped_urls'
194
194
  },
195
- newsArticleId: {
195
+ merchItemId: {
196
196
  type: DataTypes.UUID,
197
197
  allowNull: true,
198
198
  references: {
199
- model: 'news_article',
199
+ model: 'merch_item',
200
200
  key: 'id'
201
201
  },
202
- field: 'news_article_id'
202
+ field: 'merch_item_id'
203
203
  },
204
- merchItemId: {
204
+ newsArticleId: {
205
205
  type: DataTypes.UUID,
206
206
  allowNull: true,
207
207
  references: {
208
- model: 'merch_item',
208
+ model: 'news_article',
209
209
  key: 'id'
210
210
  },
211
- field: 'merch_item_id'
211
+ field: 'news_article_id'
212
212
  }
213
213
  }, {
214
214
  sequelize,
@@ -4,6 +4,7 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
 
5
5
  export interface UserContactsAttributes {
6
6
  appUserId: string;
7
+ contactId: string;
7
8
  contactAppUserId?: string;
8
9
  firstName?: string;
9
10
  lastName?: string;
@@ -17,16 +18,16 @@ export interface UserContactsAttributes {
17
18
  contactPhone3?: string;
18
19
  contactPhone3Type?: "mobile" | "work" | "home" | "main";
19
20
  active?: boolean;
20
- contactId: string;
21
21
  }
22
22
 
23
23
  export type UserContactsPk = "contactId";
24
24
  export type UserContactsId = UserContacts[UserContactsPk];
25
- export type UserContactsOptionalAttributes = "contactAppUserId" | "firstName" | "lastName" | "contactEmail1" | "contactEmail2" | "contactEmail3" | "contactPhone1" | "contactPhone1Type" | "contactPhone2" | "contactPhone2Type" | "contactPhone3" | "contactPhone3Type" | "active" | "contactId";
25
+ export type UserContactsOptionalAttributes = "contactId" | "contactAppUserId" | "firstName" | "lastName" | "contactEmail1" | "contactEmail2" | "contactEmail3" | "contactPhone1" | "contactPhone1Type" | "contactPhone2" | "contactPhone2Type" | "contactPhone3" | "contactPhone3Type" | "active";
26
26
  export type UserContactsCreationAttributes = Optional<UserContactsAttributes, UserContactsOptionalAttributes>;
27
27
 
28
28
  export class UserContacts extends Model<UserContactsAttributes, UserContactsCreationAttributes> implements UserContactsAttributes {
29
29
  appUserId!: string;
30
+ contactId!: string;
30
31
  contactAppUserId?: string;
31
32
  firstName?: string;
32
33
  lastName?: string;
@@ -40,7 +41,6 @@ export class UserContacts extends Model<UserContactsAttributes, UserContactsCrea
40
41
  contactPhone3?: string;
41
42
  contactPhone3Type?: "mobile" | "work" | "home" | "main";
42
43
  active?: boolean;
43
- contactId!: string;
44
44
 
45
45
  // UserContacts belongsTo AppUser via appUserId
46
46
  appUser!: AppUser;
@@ -59,6 +59,13 @@ export class UserContacts extends Model<UserContactsAttributes, UserContactsCrea
59
59
  },
60
60
  field: 'app_user_id'
61
61
  },
62
+ contactId: {
63
+ type: DataTypes.UUID,
64
+ allowNull: false,
65
+ defaultValue: DataTypes.UUIDV4,
66
+ primaryKey: true,
67
+ field: 'contact_id'
68
+ },
62
69
  contactAppUserId: {
63
70
  type: DataTypes.UUID,
64
71
  allowNull: true,
@@ -122,13 +129,6 @@ export class UserContacts extends Model<UserContactsAttributes, UserContactsCrea
122
129
  active: {
123
130
  type: DataTypes.BOOLEAN,
124
131
  allowNull: true
125
- },
126
- contactId: {
127
- type: DataTypes.UUID,
128
- allowNull: false,
129
- defaultValue: DataTypes.UUIDV4,
130
- primaryKey: true,
131
- field: 'contact_id'
132
132
  }
133
133
  }, {
134
134
  sequelize,
@@ -4,9 +4,9 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { FeedContentType, FeedContentTypeId } from './FeedContentType';
5
5
 
6
6
  export interface UserEngagementFactorAttributes {
7
+ id: string;
7
8
  userId: string;
8
9
  contentTypeId: string;
9
- id: string;
10
10
  engagementFactor: number;
11
11
  createDate?: Date;
12
12
  updateDate?: Date;
@@ -18,9 +18,9 @@ export type UserEngagementFactorOptionalAttributes = "id" | "engagementFactor" |
18
18
  export type UserEngagementFactorCreationAttributes = Optional<UserEngagementFactorAttributes, UserEngagementFactorOptionalAttributes>;
19
19
 
20
20
  export class UserEngagementFactor extends Model<UserEngagementFactorAttributes, UserEngagementFactorCreationAttributes> implements UserEngagementFactorAttributes {
21
+ id!: string;
21
22
  userId!: string;
22
23
  contentTypeId!: string;
23
- id!: string;
24
24
  engagementFactor!: number;
25
25
  createDate?: Date;
26
26
  updateDate?: Date;
@@ -38,6 +38,12 @@ export class UserEngagementFactor extends Model<UserEngagementFactorAttributes,
38
38
 
39
39
  static initModel(sequelize: Sequelize.Sequelize): typeof UserEngagementFactor {
40
40
  return UserEngagementFactor.init({
41
+ id: {
42
+ type: DataTypes.UUID,
43
+ allowNull: false,
44
+ defaultValue: DataTypes.UUIDV4,
45
+ primaryKey: true
46
+ },
41
47
  userId: {
42
48
  type: DataTypes.UUID,
43
49
  allowNull: false,
@@ -58,12 +64,6 @@ export class UserEngagementFactor extends Model<UserEngagementFactorAttributes,
58
64
  unique: "user_engagement_factor_user_id_content_type_id_unique",
59
65
  field: 'content_type_id'
60
66
  },
61
- id: {
62
- type: DataTypes.UUID,
63
- allowNull: false,
64
- defaultValue: DataTypes.UUIDV4,
65
- primaryKey: true
66
- },
67
67
  engagementFactor: {
68
68
  type: DataTypes.DECIMAL,
69
69
  allowNull: false,
@@ -5,11 +5,11 @@ import type { AppUser, AppUserId } from './AppUser';
5
5
  import type { CanonGenre, CanonGenreId } from './CanonGenre';
6
6
 
7
7
  export interface UserGenreAffinityAttributes {
8
+ id: string;
8
9
  userId: 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 UserGenreAffinityOptionalAttributes = "id" | "createdAt" | "updatedA
20
20
  export type UserGenreAffinityCreationAttributes = Optional<UserGenreAffinityAttributes, UserGenreAffinityOptionalAttributes>;
21
21
 
22
22
  export class UserGenreAffinity extends Model<UserGenreAffinityAttributes, UserGenreAffinityCreationAttributes> implements UserGenreAffinityAttributes {
23
+ id!: string;
23
24
  userId!: 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 UserGenreAffinity extends Model<UserGenreAffinityAttributes, UserGe
46
46
 
47
47
  static initModel(sequelize: Sequelize.Sequelize): typeof UserGenreAffinity {
48
48
  return UserGenreAffinity.init({
49
+ id: {
50
+ type: DataTypes.UUID,
51
+ allowNull: false,
52
+ defaultValue: DataTypes.UUIDV4,
53
+ primaryKey: true
54
+ },
49
55
  userId: {
50
56
  type: DataTypes.UUID,
51
57
  allowNull: false,
@@ -79,12 +85,6 @@ export class UserGenreAffinity extends Model<UserGenreAffinityAttributes, UserGe
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,