@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
@@ -8,11 +8,11 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
8
8
  import type { RadioShow, RadioShowId } from './RadioShow';
9
9
 
10
10
  export interface UserLikesAttributes {
11
+ id: string;
11
12
  appUserId: string;
12
13
  jukeboxId?: string;
13
14
  playlistId?: string;
14
15
  radioShowId?: string;
15
- id: string;
16
16
  createDate: Date;
17
17
  updateDate: Date;
18
18
  merchItemId?: string;
@@ -21,15 +21,15 @@ export interface UserLikesAttributes {
21
21
 
22
22
  export type UserLikesPk = "id";
23
23
  export type UserLikesId = UserLikes[UserLikesPk];
24
- export type UserLikesOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "createDate" | "updateDate" | "merchItemId" | "newsArticleId";
24
+ export type UserLikesOptionalAttributes = "id" | "jukeboxId" | "playlistId" | "radioShowId" | "createDate" | "updateDate" | "merchItemId" | "newsArticleId";
25
25
  export type UserLikesCreationAttributes = Optional<UserLikesAttributes, UserLikesOptionalAttributes>;
26
26
 
27
27
  export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttributes> implements UserLikesAttributes {
28
+ id!: string;
28
29
  appUserId!: string;
29
30
  jukeboxId?: string;
30
31
  playlistId?: string;
31
32
  radioShowId?: string;
32
- id!: string;
33
33
  createDate!: Date;
34
34
  updateDate!: Date;
35
35
  merchItemId?: string;
@@ -68,6 +68,12 @@ export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttri
68
68
 
69
69
  static initModel(sequelize: Sequelize.Sequelize): typeof UserLikes {
70
70
  return UserLikes.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,
@@ -104,12 +110,6 @@ export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttri
104
110
  },
105
111
  field: 'radio_show_id'
106
112
  },
107
- id: {
108
- type: DataTypes.UUID,
109
- allowNull: false,
110
- defaultValue: DataTypes.UUIDV4,
111
- primaryKey: true
112
- },
113
113
  createDate: {
114
114
  type: DataTypes.DATE,
115
115
  allowNull: false,
@@ -4,34 +4,34 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
5
5
 
6
6
  export interface UserMessagesAttributes {
7
+ id: string;
7
8
  senderId: string;
8
9
  recipientId: string;
9
10
  message: string;
10
- replyMessageId?: string;
11
- id: string;
12
11
  hasBeenRead: boolean;
13
12
  hasBeenEdited: boolean;
14
13
  hasDeletedBySender: boolean;
15
14
  hasDeletedByReceiver: boolean;
15
+ replyMessageId?: string;
16
16
  createDate: Date;
17
17
  updateDate: Date;
18
18
  }
19
19
 
20
20
  export type UserMessagesPk = "id";
21
21
  export type UserMessagesId = UserMessages[UserMessagesPk];
22
- export type UserMessagesOptionalAttributes = "replyMessageId" | "id" | "createDate" | "updateDate";
22
+ export type UserMessagesOptionalAttributes = "id" | "replyMessageId" | "createDate" | "updateDate";
23
23
  export type UserMessagesCreationAttributes = Optional<UserMessagesAttributes, UserMessagesOptionalAttributes>;
24
24
 
25
25
  export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCreationAttributes> implements UserMessagesAttributes {
26
+ id!: string;
26
27
  senderId!: string;
27
28
  recipientId!: string;
28
29
  message!: string;
29
- replyMessageId?: string;
30
- id!: string;
31
30
  hasBeenRead!: boolean;
32
31
  hasBeenEdited!: boolean;
33
32
  hasDeletedBySender!: boolean;
34
33
  hasDeletedByReceiver!: boolean;
34
+ replyMessageId?: string;
35
35
  createDate!: Date;
36
36
  updateDate!: Date;
37
37
 
@@ -65,6 +65,12 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
65
65
 
66
66
  static initModel(sequelize: Sequelize.Sequelize): typeof UserMessages {
67
67
  return UserMessages.init({
68
+ id: {
69
+ type: DataTypes.UUID,
70
+ allowNull: false,
71
+ defaultValue: DataTypes.UUIDV4,
72
+ primaryKey: true
73
+ },
68
74
  senderId: {
69
75
  type: DataTypes.UUID,
70
76
  allowNull: false,
@@ -87,21 +93,6 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
87
93
  type: DataTypes.STRING(1000),
88
94
  allowNull: false
89
95
  },
90
- replyMessageId: {
91
- type: DataTypes.UUID,
92
- allowNull: true,
93
- references: {
94
- model: 'user_messages',
95
- key: 'id'
96
- },
97
- field: 'reply_message_id'
98
- },
99
- id: {
100
- type: DataTypes.UUID,
101
- allowNull: false,
102
- defaultValue: DataTypes.UUIDV4,
103
- primaryKey: true
104
- },
105
96
  hasBeenRead: {
106
97
  type: DataTypes.BOOLEAN,
107
98
  allowNull: false,
@@ -126,6 +117,15 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
126
117
  defaultValue: false,
127
118
  field: 'has_deleted_by_receiver'
128
119
  },
120
+ replyMessageId: {
121
+ type: DataTypes.UUID,
122
+ allowNull: true,
123
+ references: {
124
+ model: 'user_messages',
125
+ key: 'id'
126
+ },
127
+ field: 'reply_message_id'
128
+ },
129
129
  createDate: {
130
130
  type: DataTypes.DATE,
131
131
  allowNull: false,
package/models/Versus.ts CHANGED
@@ -22,6 +22,7 @@ import type { VersusVote, VersusVoteId } from './VersusVote';
22
22
  import type { VersusVotingMode, VersusVotingModeId } from './VersusVotingMode';
23
23
 
24
24
  export interface VersusAttributes {
25
+ id: string;
25
26
  versusQuestionId: string;
26
27
  canonTrackId?: string;
27
28
  platformTrackId?: string;
@@ -40,9 +41,8 @@ export interface VersusAttributes {
40
41
  startsAt?: Date;
41
42
  endsAt?: Date;
42
43
  creatorUserId: string;
43
- publishedAt?: Date;
44
- id: string;
45
44
  publishRequested: boolean;
45
+ publishedAt?: Date;
46
46
  deleted: boolean;
47
47
  createdAt: Date;
48
48
  updatedAt: Date;
@@ -50,10 +50,11 @@ export interface VersusAttributes {
50
50
 
51
51
  export type VersusPk = "id";
52
52
  export type VersusId = Versus[VersusPk];
53
- export type VersusOptionalAttributes = "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "canonGenreId" | "themeText" | "versusEndVoteThresholdId" | "versusEndTimerDurationId" | "startsAt" | "endsAt" | "publishedAt" | "id" | "createdAt" | "updatedAt";
53
+ export type VersusOptionalAttributes = "id" | "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "canonGenreId" | "themeText" | "versusEndVoteThresholdId" | "versusEndTimerDurationId" | "startsAt" | "endsAt" | "publishedAt" | "createdAt" | "updatedAt";
54
54
  export type VersusCreationAttributes = Optional<VersusAttributes, VersusOptionalAttributes>;
55
55
 
56
56
  export class Versus extends Model<VersusAttributes, VersusCreationAttributes> implements VersusAttributes {
57
+ id!: string;
57
58
  versusQuestionId!: string;
58
59
  canonTrackId?: string;
59
60
  platformTrackId?: string;
@@ -72,9 +73,8 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
72
73
  startsAt?: Date;
73
74
  endsAt?: Date;
74
75
  creatorUserId!: string;
75
- publishedAt?: Date;
76
- id!: string;
77
76
  publishRequested!: boolean;
77
+ publishedAt?: Date;
78
78
  deleted!: boolean;
79
79
  createdAt!: Date;
80
80
  updatedAt!: Date;
@@ -217,6 +217,12 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
217
217
 
218
218
  static initModel(sequelize: Sequelize.Sequelize): typeof Versus {
219
219
  return Versus.init({
220
+ id: {
221
+ type: DataTypes.UUID,
222
+ allowNull: false,
223
+ defaultValue: DataTypes.UUIDV4,
224
+ primaryKey: true
225
+ },
220
226
  versusQuestionId: {
221
227
  type: DataTypes.UUID,
222
228
  allowNull: false,
@@ -367,23 +373,17 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
367
373
  },
368
374
  field: 'creator_user_id'
369
375
  },
370
- publishedAt: {
371
- type: DataTypes.DATE,
372
- allowNull: true,
373
- field: 'published_at'
374
- },
375
- id: {
376
- type: DataTypes.UUID,
377
- allowNull: false,
378
- defaultValue: DataTypes.UUIDV4,
379
- primaryKey: true
380
- },
381
376
  publishRequested: {
382
377
  type: DataTypes.BOOLEAN,
383
378
  allowNull: false,
384
379
  defaultValue: false,
385
380
  field: 'publish_requested'
386
381
  },
382
+ publishedAt: {
383
+ type: DataTypes.DATE,
384
+ allowNull: true,
385
+ field: 'published_at'
386
+ },
387
387
  deleted: {
388
388
  type: DataTypes.BOOLEAN,
389
389
  allowNull: false,
@@ -4,11 +4,11 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { Versus, VersusId } from './Versus';
5
5
 
6
6
  export interface VersusCoCreatorAttributes {
7
- versusId: string;
8
7
  id: string;
8
+ versusId: string;
9
+ appUserId: string;
9
10
  createdAt: Date;
10
11
  updatedAt: Date;
11
- appUserId: string;
12
12
  }
13
13
 
14
14
  export type VersusCoCreatorPk = "id";
@@ -17,11 +17,11 @@ export type VersusCoCreatorOptionalAttributes = "id" | "createdAt" | "updatedAt"
17
17
  export type VersusCoCreatorCreationAttributes = Optional<VersusCoCreatorAttributes, VersusCoCreatorOptionalAttributes>;
18
18
 
19
19
  export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCreatorCreationAttributes> implements VersusCoCreatorAttributes {
20
- versusId!: string;
21
20
  id!: string;
21
+ versusId!: string;
22
+ appUserId!: string;
22
23
  createdAt!: Date;
23
24
  updatedAt!: Date;
24
- appUserId!: string;
25
25
 
26
26
  // VersusCoCreator belongsTo AppUser via appUserId
27
27
  appUser!: AppUser;
@@ -36,6 +36,12 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
36
36
 
37
37
  static initModel(sequelize: Sequelize.Sequelize): typeof VersusCoCreator {
38
38
  return VersusCoCreator.init({
39
+ id: {
40
+ type: DataTypes.UUID,
41
+ allowNull: false,
42
+ defaultValue: DataTypes.UUIDV4,
43
+ primaryKey: true
44
+ },
39
45
  versusId: {
40
46
  type: DataTypes.UUID,
41
47
  allowNull: false,
@@ -45,11 +51,14 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
45
51
  },
46
52
  field: 'versus_id'
47
53
  },
48
- id: {
54
+ appUserId: {
49
55
  type: DataTypes.UUID,
50
56
  allowNull: false,
51
- defaultValue: DataTypes.UUIDV4,
52
- primaryKey: true
57
+ references: {
58
+ model: 'app_user',
59
+ key: 'id'
60
+ },
61
+ field: 'app_user_id'
53
62
  },
54
63
  createdAt: {
55
64
  type: DataTypes.DATE,
@@ -62,15 +71,6 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
62
71
  allowNull: false,
63
72
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
64
73
  field: 'updated_at'
65
- },
66
- appUserId: {
67
- type: DataTypes.UUID,
68
- allowNull: false,
69
- references: {
70
- model: 'app_user',
71
- key: 'id'
72
- },
73
- field: 'app_user_id'
74
74
  }
75
75
  }, {
76
76
  sequelize,
@@ -11,6 +11,7 @@ import type { Versus, VersusId } from './Versus';
11
11
  import type { VersusEntityKind, VersusEntityKindId } from './VersusEntityKind';
12
12
 
13
13
  export interface VersusOptionAttributes {
14
+ id: string;
14
15
  versusId: string;
15
16
  entityKindId: number;
16
17
  sortOrder: number;
@@ -22,7 +23,6 @@ export interface VersusOptionAttributes {
22
23
  platformArtistId?: string;
23
24
  voteScore?: number;
24
25
  resultsScore?: number;
25
- id: string;
26
26
  createdAt: Date;
27
27
  updatedAt: Date;
28
28
  deleted: boolean;
@@ -31,10 +31,11 @@ export interface VersusOptionAttributes {
31
31
 
32
32
  export type VersusOptionPk = "id";
33
33
  export type VersusOptionId = VersusOption[VersusOptionPk];
34
- export type VersusOptionOptionalAttributes = "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "voteScore" | "resultsScore" | "id" | "createdAt" | "updatedAt" | "appUserId";
34
+ export type VersusOptionOptionalAttributes = "id" | "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "voteScore" | "resultsScore" | "createdAt" | "updatedAt" | "appUserId";
35
35
  export type VersusOptionCreationAttributes = Optional<VersusOptionAttributes, VersusOptionOptionalAttributes>;
36
36
 
37
37
  export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCreationAttributes> implements VersusOptionAttributes {
38
+ id!: string;
38
39
  versusId!: string;
39
40
  entityKindId!: number;
40
41
  sortOrder!: number;
@@ -46,7 +47,6 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
46
47
  platformArtistId?: string;
47
48
  voteScore?: number;
48
49
  resultsScore?: number;
49
- id!: string;
50
50
  createdAt!: Date;
51
51
  updatedAt!: Date;
52
52
  deleted!: boolean;
@@ -100,6 +100,12 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
100
100
 
101
101
  static initModel(sequelize: Sequelize.Sequelize): typeof VersusOption {
102
102
  return VersusOption.init({
103
+ id: {
104
+ type: DataTypes.UUID,
105
+ allowNull: false,
106
+ defaultValue: DataTypes.UUIDV4,
107
+ primaryKey: true
108
+ },
103
109
  versusId: {
104
110
  type: DataTypes.UUID,
105
111
  allowNull: false,
@@ -187,12 +193,6 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
187
193
  allowNull: true,
188
194
  field: 'results_score'
189
195
  },
190
- id: {
191
- type: DataTypes.UUID,
192
- allowNull: false,
193
- defaultValue: DataTypes.UUIDV4,
194
- primaryKey: true
195
- },
196
196
  createdAt: {
197
197
  type: DataTypes.DATE,
198
198
  allowNull: false,
@@ -7,29 +7,29 @@ import type { Versus, VersusId } from './Versus';
7
7
  import type { VersusEntityKind, VersusEntityKindId } from './VersusEntityKind';
8
8
 
9
9
  export interface VersusPublishIssueAttributes {
10
+ id: string;
10
11
  versusId: string;
11
12
  entityKindId: number;
12
13
  platformTrackId?: string;
13
14
  platformAlbumId?: string;
14
15
  platformArtistId?: string;
15
16
  detail?: string;
16
- id: string;
17
17
  createdAt: Date;
18
18
  }
19
19
 
20
20
  export type VersusPublishIssuePk = "id";
21
21
  export type VersusPublishIssueId = VersusPublishIssue[VersusPublishIssuePk];
22
- export type VersusPublishIssueOptionalAttributes = "platformTrackId" | "platformAlbumId" | "platformArtistId" | "detail" | "id" | "createdAt";
22
+ export type VersusPublishIssueOptionalAttributes = "id" | "platformTrackId" | "platformAlbumId" | "platformArtistId" | "detail" | "createdAt";
23
23
  export type VersusPublishIssueCreationAttributes = Optional<VersusPublishIssueAttributes, VersusPublishIssueOptionalAttributes>;
24
24
 
25
25
  export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, VersusPublishIssueCreationAttributes> implements VersusPublishIssueAttributes {
26
+ id!: string;
26
27
  versusId!: string;
27
28
  entityKindId!: number;
28
29
  platformTrackId?: string;
29
30
  platformAlbumId?: string;
30
31
  platformArtistId?: string;
31
32
  detail?: string;
32
- id!: string;
33
33
  createdAt!: Date;
34
34
 
35
35
  // VersusPublishIssue belongsTo PlatformAlbum via platformAlbumId
@@ -60,6 +60,12 @@ export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, Vers
60
60
 
61
61
  static initModel(sequelize: Sequelize.Sequelize): typeof VersusPublishIssue {
62
62
  return VersusPublishIssue.init({
63
+ id: {
64
+ type: DataTypes.UUID,
65
+ allowNull: false,
66
+ defaultValue: DataTypes.UUIDV4,
67
+ primaryKey: true
68
+ },
63
69
  versusId: {
64
70
  type: DataTypes.UUID,
65
71
  allowNull: false,
@@ -109,12 +115,6 @@ export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, Vers
109
115
  type: DataTypes.TEXT,
110
116
  allowNull: true
111
117
  },
112
- id: {
113
- type: DataTypes.UUID,
114
- allowNull: false,
115
- defaultValue: DataTypes.UUIDV4,
116
- primaryKey: true
117
- },
118
118
  createdAt: {
119
119
  type: DataTypes.DATE,
120
120
  allowNull: false,
@@ -5,10 +5,10 @@ import type { VersusQuestionVariableType, VersusQuestionVariableTypeId } from '.
5
5
  import type { VersusVotingListType, VersusVotingListTypeId } from './VersusVotingListType';
6
6
 
7
7
  export interface VersusQuestionAttributes {
8
+ id: string;
8
9
  questionTemplate: string;
9
10
  questionVariableTypeId: number;
10
11
  votingListTypeId: number;
11
- id: string;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  }
@@ -19,10 +19,10 @@ export type VersusQuestionOptionalAttributes = "id" | "createdAt" | "updatedAt";
19
19
  export type VersusQuestionCreationAttributes = Optional<VersusQuestionAttributes, VersusQuestionOptionalAttributes>;
20
20
 
21
21
  export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuestionCreationAttributes> implements VersusQuestionAttributes {
22
+ id!: string;
22
23
  questionTemplate!: string;
23
24
  questionVariableTypeId!: number;
24
25
  votingListTypeId!: number;
25
- id!: string;
26
26
  createdAt!: Date;
27
27
  updatedAt!: Date;
28
28
 
@@ -51,6 +51,12 @@ export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuesti
51
51
 
52
52
  static initModel(sequelize: Sequelize.Sequelize): typeof VersusQuestion {
53
53
  return VersusQuestion.init({
54
+ id: {
55
+ type: DataTypes.UUID,
56
+ allowNull: false,
57
+ defaultValue: DataTypes.UUIDV4,
58
+ primaryKey: true
59
+ },
54
60
  questionTemplate: {
55
61
  type: DataTypes.TEXT,
56
62
  allowNull: false,
@@ -74,12 +80,6 @@ export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuesti
74
80
  },
75
81
  field: 'voting_list_type_id'
76
82
  },
77
- id: {
78
- type: DataTypes.UUID,
79
- allowNull: false,
80
- defaultValue: DataTypes.UUIDV4,
81
- primaryKey: true
82
- },
83
83
  createdAt: {
84
84
  type: DataTypes.DATE,
85
85
  allowNull: false,
@@ -4,9 +4,9 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { Versus, VersusId } from './Versus';
5
5
 
6
6
  export interface VersusVoteAttributes {
7
+ id: string;
7
8
  versusId: string;
8
9
  appUserId: string;
9
- id: string;
10
10
  createdAt: Date;
11
11
  }
12
12
 
@@ -16,9 +16,9 @@ export type VersusVoteOptionalAttributes = "id" | "createdAt";
16
16
  export type VersusVoteCreationAttributes = Optional<VersusVoteAttributes, VersusVoteOptionalAttributes>;
17
17
 
18
18
  export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAttributes> implements VersusVoteAttributes {
19
+ id!: string;
19
20
  versusId!: string;
20
21
  appUserId!: string;
21
- id!: string;
22
22
  createdAt!: Date;
23
23
 
24
24
  // VersusVote belongsTo AppUser via appUserId
@@ -34,6 +34,12 @@ export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAt
34
34
 
35
35
  static initModel(sequelize: Sequelize.Sequelize): typeof VersusVote {
36
36
  return VersusVote.init({
37
+ id: {
38
+ type: DataTypes.UUID,
39
+ allowNull: false,
40
+ defaultValue: DataTypes.UUIDV4,
41
+ primaryKey: true
42
+ },
37
43
  versusId: {
38
44
  type: DataTypes.UUID,
39
45
  allowNull: false,
@@ -54,12 +60,6 @@ export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAt
54
60
  unique: "uq_versus_vote_versus_app_user",
55
61
  field: 'app_user_id'
56
62
  },
57
- id: {
58
- type: DataTypes.UUID,
59
- allowNull: false,
60
- defaultValue: DataTypes.UUIDV4,
61
- primaryKey: true
62
- },
63
63
  createdAt: {
64
64
  type: DataTypes.DATE,
65
65
  allowNull: false,