@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
@@ -3,10 +3,10 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { UserAffinity, UserAffinityId } from './UserAffinity';
4
4
 
5
5
  export interface AffinityRelationshipTypeAttributes {
6
+ id: string;
6
7
  name: string;
7
8
  category: string;
8
9
  tier: string;
9
- id: string;
10
10
  createDate?: Date;
11
11
  updateDate?: Date;
12
12
  }
@@ -17,10 +17,10 @@ export type AffinityRelationshipTypeOptionalAttributes = "id" | "createDate" | "
17
17
  export type AffinityRelationshipTypeCreationAttributes = Optional<AffinityRelationshipTypeAttributes, AffinityRelationshipTypeOptionalAttributes>;
18
18
 
19
19
  export class AffinityRelationshipType extends Model<AffinityRelationshipTypeAttributes, AffinityRelationshipTypeCreationAttributes> implements AffinityRelationshipTypeAttributes {
20
+ id!: string;
20
21
  name!: string;
21
22
  category!: string;
22
23
  tier!: string;
23
- id!: string;
24
24
  createDate?: Date;
25
25
  updateDate?: Date;
26
26
 
@@ -39,6 +39,12 @@ export class AffinityRelationshipType extends Model<AffinityRelationshipTypeAttr
39
39
 
40
40
  static initModel(sequelize: Sequelize.Sequelize): typeof AffinityRelationshipType {
41
41
  return AffinityRelationshipType.init({
42
+ id: {
43
+ type: DataTypes.UUID,
44
+ allowNull: false,
45
+ defaultValue: DataTypes.UUIDV4,
46
+ primaryKey: true
47
+ },
42
48
  name: {
43
49
  type: DataTypes.STRING(50),
44
50
  allowNull: false,
@@ -52,12 +58,6 @@ export class AffinityRelationshipType extends Model<AffinityRelationshipTypeAttr
52
58
  type: DataTypes.STRING(20),
53
59
  allowNull: false
54
60
  },
55
- id: {
56
- type: DataTypes.UUID,
57
- allowNull: false,
58
- defaultValue: DataTypes.UUIDV4,
59
- primaryKey: true
60
- },
61
61
  createDate: {
62
62
  type: DataTypes.DATE,
63
63
  allowNull: true,
package/models/AppUser.ts CHANGED
@@ -27,9 +27,9 @@ import type { VersusOption, VersusOptionId } from './VersusOption';
27
27
  import type { VersusVote, VersusVoteId } from './VersusVote';
28
28
 
29
29
  export interface AppUserAttributes {
30
- firstName: string;
31
- email?: string;
32
30
  id: string;
31
+ email?: string;
32
+ firstName: string;
33
33
  createDate: Date;
34
34
  updateDate: Date;
35
35
  syncContacts?: boolean;
@@ -54,13 +54,13 @@ export interface AppUserAttributes {
54
54
 
55
55
  export type AppUserPk = "id";
56
56
  export type AppUserId = AppUser[AppUserPk];
57
- export type AppUserOptionalAttributes = "email" | "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError" | "earbugAccessControlPreference" | "unsubscribeAll" | "unsubscribeBiweeklyEmail" | "unsubscribeFollowingNotifications" | "unsubscribeInterestNotifications" | "unsubscribeFunNotifications" | "hardBounce" | "softBounce1" | "softBounce2" | "softBounce3" | "bio";
57
+ export type AppUserOptionalAttributes = "id" | "email" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError" | "earbugAccessControlPreference" | "unsubscribeAll" | "unsubscribeBiweeklyEmail" | "unsubscribeFollowingNotifications" | "unsubscribeInterestNotifications" | "unsubscribeFunNotifications" | "hardBounce" | "softBounce1" | "softBounce2" | "softBounce3" | "bio";
58
58
  export type AppUserCreationAttributes = Optional<AppUserAttributes, AppUserOptionalAttributes>;
59
59
 
60
60
  export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes> implements AppUserAttributes {
61
- firstName!: string;
62
- email?: string;
63
61
  id!: string;
62
+ email?: string;
63
+ firstName!: string;
64
64
  createDate!: Date;
65
65
  updateDate!: Date;
66
66
  syncContacts?: boolean;
@@ -419,21 +419,21 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
419
419
 
420
420
  static initModel(sequelize: Sequelize.Sequelize): typeof AppUser {
421
421
  return AppUser.init({
422
- firstName: {
423
- type: DataTypes.TEXT,
422
+ id: {
423
+ type: DataTypes.UUID,
424
424
  allowNull: false,
425
- field: 'first_name'
425
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
426
+ primaryKey: true
426
427
  },
427
428
  email: {
428
429
  type: DataTypes.TEXT,
429
430
  allowNull: true,
430
431
  unique: "uk_app_user_email"
431
432
  },
432
- id: {
433
- type: DataTypes.UUID,
433
+ firstName: {
434
+ type: DataTypes.TEXT,
434
435
  allowNull: false,
435
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
436
- primaryKey: true
436
+ field: 'first_name'
437
437
  },
438
438
  createDate: {
439
439
  type: DataTypes.DATE,
@@ -4,10 +4,10 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
 
5
5
  export interface AppUserDeviceAttributes {
6
6
  id: string;
7
- createdAt: Date;
8
7
  appUserId: string;
9
8
  devicePlatformId: number;
10
9
  endpointArn: string;
10
+ createdAt: Date;
11
11
  platformApplicationArn?: string;
12
12
  }
13
13
 
@@ -18,10 +18,10 @@ export type AppUserDeviceCreationAttributes = Optional<AppUserDeviceAttributes,
18
18
 
19
19
  export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceCreationAttributes> implements AppUserDeviceAttributes {
20
20
  id!: string;
21
- createdAt!: Date;
22
21
  appUserId!: string;
23
22
  devicePlatformId!: number;
24
23
  endpointArn!: string;
24
+ createdAt!: Date;
25
25
  platformApplicationArn?: string;
26
26
 
27
27
  // AppUserDevice belongsTo AppUser via appUserId
@@ -38,12 +38,6 @@ export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceC
38
38
  defaultValue: DataTypes.UUIDV4,
39
39
  primaryKey: true
40
40
  },
41
- createdAt: {
42
- type: DataTypes.DATE,
43
- allowNull: false,
44
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
45
- field: 'created_at'
46
- },
47
41
  appUserId: {
48
42
  type: DataTypes.UUID,
49
43
  allowNull: false,
@@ -64,6 +58,12 @@ export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceC
64
58
  unique: "unique_app_user_device_endpoint_arn",
65
59
  field: 'endpoint_arn'
66
60
  },
61
+ createdAt: {
62
+ type: DataTypes.DATE,
63
+ allowNull: false,
64
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
65
+ field: 'created_at'
66
+ },
67
67
  platformApplicationArn: {
68
68
  type: DataTypes.TEXT,
69
69
  allowNull: true,
@@ -0,0 +1,66 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+
4
+ export interface AppUserDeviceClassicBackup20260906Attributes {
5
+ id?: string;
6
+ appUserId?: string;
7
+ devicePlatformId?: number;
8
+ endpointArn?: string;
9
+ createdAt?: Date;
10
+ platformApplicationArn?: string;
11
+ }
12
+
13
+ export type AppUserDeviceClassicBackup20260906Pk = "id";
14
+ export type AppUserDeviceClassicBackup20260906Id = AppUserDeviceClassicBackup20260906[AppUserDeviceClassicBackup20260906Pk];
15
+ export type AppUserDeviceClassicBackup20260906OptionalAttributes = "id" | "appUserId" | "devicePlatformId" | "endpointArn" | "createdAt" | "platformApplicationArn";
16
+ export type AppUserDeviceClassicBackup20260906CreationAttributes = Optional<AppUserDeviceClassicBackup20260906Attributes, AppUserDeviceClassicBackup20260906OptionalAttributes>;
17
+
18
+ export class AppUserDeviceClassicBackup20260906 extends Model<AppUserDeviceClassicBackup20260906Attributes, AppUserDeviceClassicBackup20260906CreationAttributes> implements AppUserDeviceClassicBackup20260906Attributes {
19
+ id?: string;
20
+ appUserId?: string;
21
+ devicePlatformId?: number;
22
+ endpointArn?: string;
23
+ createdAt?: Date;
24
+ platformApplicationArn?: string;
25
+
26
+
27
+ static initModel(sequelize: Sequelize.Sequelize): typeof AppUserDeviceClassicBackup20260906 {
28
+ return AppUserDeviceClassicBackup20260906.init({
29
+ id: {
30
+ type: DataTypes.UUID,
31
+ allowNull: true,
32
+ primaryKey: true
33
+ },
34
+ appUserId: {
35
+ type: DataTypes.UUID,
36
+ allowNull: true,
37
+ field: 'app_user_id'
38
+ },
39
+ devicePlatformId: {
40
+ type: DataTypes.SMALLINT,
41
+ allowNull: true,
42
+ field: 'device_platform_id'
43
+ },
44
+ endpointArn: {
45
+ type: DataTypes.TEXT,
46
+ allowNull: true,
47
+ field: 'endpoint_arn'
48
+ },
49
+ createdAt: {
50
+ type: DataTypes.DATE,
51
+ allowNull: true,
52
+ field: 'created_at'
53
+ },
54
+ platformApplicationArn: {
55
+ type: DataTypes.TEXT,
56
+ allowNull: true,
57
+ field: 'platform_application_arn'
58
+ }
59
+ }, {
60
+ sequelize,
61
+ tableName: 'app_user_device_classic_backup_20260906',
62
+ schema: 'eb',
63
+ timestamps: false
64
+ });
65
+ }
66
+ }
@@ -3,28 +3,28 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { AppUser, AppUserId } from './AppUser';
4
4
 
5
5
  export interface AppUserFollowRelationAttributes {
6
+ id: string;
6
7
  appUserId: string;
7
8
  followingAppUserId: string;
8
9
  stateId: number;
9
10
  isBlocked: boolean;
10
11
  createdAt: Date;
11
12
  updatedAt: Date;
12
- id: string;
13
13
  }
14
14
 
15
15
  export type AppUserFollowRelationPk = "id";
16
16
  export type AppUserFollowRelationId = AppUserFollowRelation[AppUserFollowRelationPk];
17
- export type AppUserFollowRelationOptionalAttributes = "stateId" | "createdAt" | "updatedAt" | "id";
17
+ export type AppUserFollowRelationOptionalAttributes = "id" | "stateId" | "createdAt" | "updatedAt";
18
18
  export type AppUserFollowRelationCreationAttributes = Optional<AppUserFollowRelationAttributes, AppUserFollowRelationOptionalAttributes>;
19
19
 
20
20
  export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes> implements AppUserFollowRelationAttributes {
21
+ id!: string;
21
22
  appUserId!: string;
22
23
  followingAppUserId!: string;
23
24
  stateId!: number;
24
25
  isBlocked!: boolean;
25
26
  createdAt!: Date;
26
27
  updatedAt!: Date;
27
- id!: string;
28
28
 
29
29
  // AppUserFollowRelation belongsTo AppUser via appUserId
30
30
  appUser!: AppUser;
@@ -39,6 +39,12 @@ export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes
39
39
 
40
40
  static initModel(sequelize: Sequelize.Sequelize): typeof AppUserFollowRelation {
41
41
  return AppUserFollowRelation.init({
42
+ id: {
43
+ type: DataTypes.UUID,
44
+ allowNull: false,
45
+ defaultValue: DataTypes.UUIDV4,
46
+ primaryKey: true
47
+ },
42
48
  appUserId: {
43
49
  type: DataTypes.UUID,
44
50
  allowNull: false,
@@ -82,12 +88,6 @@ export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes
82
88
  allowNull: false,
83
89
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
84
90
  field: 'updated_at'
85
- },
86
- id: {
87
- type: DataTypes.UUID,
88
- allowNull: false,
89
- defaultValue: DataTypes.UUIDV4,
90
- primaryKey: true
91
91
  }
92
92
  }, {
93
93
  sequelize,
@@ -4,36 +4,36 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { Platform, PlatformId } from './Platform';
5
5
 
6
6
  export interface AppUserPlatformRelationAttributes {
7
+ id: string;
7
8
  appUserId: string;
8
9
  platformId: number;
9
- externalUserId: string;
10
- accessToken: string;
11
- refreshToken?: string;
12
- expirationDate: Date;
13
- countryCode: string;
14
- id: string;
10
+ externalUserId?: string;
15
11
  createDate: Date;
16
12
  updateDate: Date;
13
+ accessToken?: string;
14
+ refreshToken?: string;
15
+ expirationDate: Date;
17
16
  stateId: number;
17
+ countryCode: string;
18
18
  }
19
19
 
20
20
  export type AppUserPlatformRelationPk = "id";
21
21
  export type AppUserPlatformRelationId = AppUserPlatformRelation[AppUserPlatformRelationPk];
22
- export type AppUserPlatformRelationOptionalAttributes = "refreshToken" | "id" | "createDate" | "updateDate" | "stateId";
22
+ export type AppUserPlatformRelationOptionalAttributes = "id" | "externalUserId" | "createDate" | "updateDate" | "accessToken" | "refreshToken" | "stateId";
23
23
  export type AppUserPlatformRelationCreationAttributes = Optional<AppUserPlatformRelationAttributes, AppUserPlatformRelationOptionalAttributes>;
24
24
 
25
25
  export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes> implements AppUserPlatformRelationAttributes {
26
+ id!: string;
26
27
  appUserId!: string;
27
28
  platformId!: number;
28
- externalUserId!: string;
29
- accessToken!: string;
30
- refreshToken?: string;
31
- expirationDate!: Date;
32
- countryCode!: string;
33
- id!: string;
29
+ externalUserId?: string;
34
30
  createDate!: Date;
35
31
  updateDate!: Date;
32
+ accessToken?: string;
33
+ refreshToken?: string;
34
+ expirationDate!: Date;
36
35
  stateId!: number;
36
+ countryCode!: string;
37
37
 
38
38
  // AppUserPlatformRelation belongsTo AppUser via appUserId
39
39
  appUser!: AppUser;
@@ -48,6 +48,12 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
48
48
 
49
49
  static initModel(sequelize: Sequelize.Sequelize): typeof AppUserPlatformRelation {
50
50
  return AppUserPlatformRelation.init({
51
+ id: {
52
+ type: DataTypes.UUID,
53
+ allowNull: false,
54
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
55
+ primaryKey: true
56
+ },
51
57
  appUserId: {
52
58
  type: DataTypes.UUID,
53
59
  allowNull: false,
@@ -69,12 +75,24 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
69
75
  },
70
76
  externalUserId: {
71
77
  type: DataTypes.TEXT,
72
- allowNull: false,
78
+ allowNull: true,
73
79
  field: 'external_user_id'
74
80
  },
81
+ createDate: {
82
+ type: DataTypes.DATE,
83
+ allowNull: false,
84
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
85
+ field: 'create_date'
86
+ },
87
+ updateDate: {
88
+ type: DataTypes.DATE,
89
+ allowNull: false,
90
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
91
+ field: 'update_date'
92
+ },
75
93
  accessToken: {
76
94
  type: DataTypes.STRING,
77
- allowNull: false,
95
+ allowNull: true,
78
96
  field: 'access_token'
79
97
  },
80
98
  refreshToken: {
@@ -87,34 +105,16 @@ export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttrib
87
105
  allowNull: false,
88
106
  field: 'expiration_date'
89
107
  },
90
- countryCode: {
91
- type: DataTypes.STRING(2),
92
- allowNull: false,
93
- field: 'country_code'
94
- },
95
- id: {
96
- type: DataTypes.UUID,
97
- allowNull: false,
98
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
99
- primaryKey: true
100
- },
101
- createDate: {
102
- type: DataTypes.DATE,
103
- allowNull: false,
104
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
105
- field: 'create_date'
106
- },
107
- updateDate: {
108
- type: DataTypes.DATE,
109
- allowNull: false,
110
- defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
111
- field: 'update_date'
112
- },
113
108
  stateId: {
114
109
  type: DataTypes.SMALLINT,
115
110
  allowNull: false,
116
111
  defaultValue: 0,
117
112
  field: 'state_id'
113
+ },
114
+ countryCode: {
115
+ type: DataTypes.STRING(2),
116
+ allowNull: false,
117
+ field: 'country_code'
118
118
  }
119
119
  }, {
120
120
  sequelize,
@@ -10,36 +10,36 @@ import type { Versus, VersusId } from './Versus';
10
10
  import type { VersusOption, VersusOptionId } from './VersusOption';
11
11
 
12
12
  export interface CanonAlbumAttributes {
13
+ id: string;
13
14
  name: string;
14
15
  asciiName: string;
15
16
  releaseDate?: string;
16
17
  noOfDisc?: number;
17
- description?: string;
18
- id: string;
19
18
  createDate: Date;
20
19
  updateDate: Date;
21
20
  hasPhoto?: boolean;
22
21
  hasThumbnailPhoto?: boolean;
22
+ description?: string;
23
23
  images?: object;
24
24
  lastImageHarvestAttempt?: Date;
25
25
  }
26
26
 
27
27
  export type CanonAlbumPk = "id";
28
28
  export type CanonAlbumId = CanonAlbum[CanonAlbumPk];
29
- export type CanonAlbumOptionalAttributes = "releaseDate" | "noOfDisc" | "description" | "id" | "createDate" | "updateDate" | "hasPhoto" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
29
+ export type CanonAlbumOptionalAttributes = "id" | "releaseDate" | "noOfDisc" | "createDate" | "updateDate" | "hasPhoto" | "hasThumbnailPhoto" | "description" | "images" | "lastImageHarvestAttempt";
30
30
  export type CanonAlbumCreationAttributes = Optional<CanonAlbumAttributes, CanonAlbumOptionalAttributes>;
31
31
 
32
32
  export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAttributes> implements CanonAlbumAttributes {
33
+ id!: string;
33
34
  name!: string;
34
35
  asciiName!: string;
35
36
  releaseDate?: string;
36
37
  noOfDisc?: number;
37
- description?: string;
38
- id!: string;
39
38
  createDate!: Date;
40
39
  updateDate!: Date;
41
40
  hasPhoto?: boolean;
42
41
  hasThumbnailPhoto?: boolean;
42
+ description?: string;
43
43
  images?: object;
44
44
  lastImageHarvestAttempt?: Date;
45
45
 
@@ -142,6 +142,12 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
142
142
 
143
143
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonAlbum {
144
144
  return CanonAlbum.init({
145
+ id: {
146
+ type: DataTypes.UUID,
147
+ allowNull: false,
148
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
149
+ primaryKey: true
150
+ },
145
151
  name: {
146
152
  type: DataTypes.TEXT,
147
153
  allowNull: false
@@ -161,16 +167,6 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
161
167
  allowNull: true,
162
168
  field: 'no_of_disc'
163
169
  },
164
- description: {
165
- type: DataTypes.TEXT,
166
- allowNull: true
167
- },
168
- id: {
169
- type: DataTypes.UUID,
170
- allowNull: false,
171
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
172
- primaryKey: true
173
- },
174
170
  createDate: {
175
171
  type: DataTypes.DATE,
176
172
  allowNull: false,
@@ -195,6 +191,10 @@ export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAt
195
191
  defaultValue: false,
196
192
  field: 'has_thumbnail_photo'
197
193
  },
194
+ description: {
195
+ type: DataTypes.TEXT,
196
+ allowNull: true
197
+ },
198
198
  images: {
199
199
  type: DataTypes.JSONB,
200
200
  allowNull: true
@@ -16,10 +16,10 @@ import type { Versus, VersusId } from './Versus';
16
16
  import type { VersusOption, VersusOptionId } from './VersusOption';
17
17
 
18
18
  export interface CanonArtistAttributes {
19
+ id: string;
19
20
  name: string;
20
21
  asciiName: string;
21
22
  description?: string;
22
- id: string;
23
23
  hasPhoto: boolean;
24
24
  createDate: Date;
25
25
  updateDate: Date;
@@ -28,22 +28,22 @@ export interface CanonArtistAttributes {
28
28
  lastImageHarvestAttempt?: Date;
29
29
  merchHarvestDay?: number;
30
30
  newsHarvestDay?: number;
31
+ popularityRank?: number;
31
32
  lastGenreHarvestAttempt?: Date;
32
33
  genreHarvestCount: number;
33
- popularityRank?: number;
34
34
  popularityScore: number;
35
35
  }
36
36
 
37
37
  export type CanonArtistPk = "id";
38
38
  export type CanonArtistId = CanonArtist[CanonArtistPk];
39
- export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay" | "lastGenreHarvestAttempt" | "genreHarvestCount" | "popularityRank" | "popularityScore";
39
+ export type CanonArtistOptionalAttributes = "id" | "description" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay" | "popularityRank" | "lastGenreHarvestAttempt" | "genreHarvestCount" | "popularityScore";
40
40
  export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
41
41
 
42
42
  export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
43
+ id!: string;
43
44
  name!: string;
44
45
  asciiName!: string;
45
46
  description?: string;
46
- id!: string;
47
47
  hasPhoto!: boolean;
48
48
  createDate!: Date;
49
49
  updateDate!: Date;
@@ -52,9 +52,9 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
52
52
  lastImageHarvestAttempt?: Date;
53
53
  merchHarvestDay?: number;
54
54
  newsHarvestDay?: number;
55
+ popularityRank?: number;
55
56
  lastGenreHarvestAttempt?: Date;
56
57
  genreHarvestCount!: number;
57
- popularityRank?: number;
58
58
  popularityScore!: number;
59
59
 
60
60
  // CanonArtist hasMany CanonArtistAlbumRelation via canonArtistId
@@ -228,6 +228,12 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
228
228
 
229
229
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtist {
230
230
  return CanonArtist.init({
231
+ id: {
232
+ type: DataTypes.UUID,
233
+ allowNull: false,
234
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
235
+ primaryKey: true
236
+ },
231
237
  name: {
232
238
  type: DataTypes.TEXT,
233
239
  allowNull: false
@@ -241,12 +247,6 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
241
247
  type: DataTypes.TEXT,
242
248
  allowNull: true
243
249
  },
244
- id: {
245
- type: DataTypes.UUID,
246
- allowNull: false,
247
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
248
- primaryKey: true
249
- },
250
250
  hasPhoto: {
251
251
  type: DataTypes.BOOLEAN,
252
252
  allowNull: false,
@@ -290,6 +290,11 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
290
290
  allowNull: true,
291
291
  field: 'news_harvest_day'
292
292
  },
293
+ popularityRank: {
294
+ type: DataTypes.INTEGER,
295
+ allowNull: true,
296
+ field: 'popularity_rank'
297
+ },
293
298
  lastGenreHarvestAttempt: {
294
299
  type: DataTypes.DATE,
295
300
  allowNull: true,
@@ -301,11 +306,6 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
301
306
  defaultValue: 0,
302
307
  field: 'genre_harvest_count'
303
308
  },
304
- popularityRank: {
305
- type: DataTypes.INTEGER,
306
- allowNull: true,
307
- field: 'popularity_rank'
308
- },
309
309
  popularityScore: {
310
310
  type: DataTypes.INTEGER,
311
311
  allowNull: false,
@@ -16,26 +16,26 @@ import type { UserGenreAffinity, UserGenreAffinityId } from './UserGenreAffinity
16
16
  import type { Versus, VersusId } from './Versus';
17
17
 
18
18
  export interface CanonGenreAttributes {
19
+ id: string;
19
20
  name: string;
20
21
  asciiName: string;
21
22
  description: string;
22
23
  parentGenreId?: string;
23
- id: string;
24
24
  createDate: Date;
25
25
  updateDate: Date;
26
26
  }
27
27
 
28
28
  export type CanonGenrePk = "id";
29
29
  export type CanonGenreId = CanonGenre[CanonGenrePk];
30
- export type CanonGenreOptionalAttributes = "parentGenreId" | "id" | "createDate" | "updateDate";
30
+ export type CanonGenreOptionalAttributes = "id" | "parentGenreId" | "createDate" | "updateDate";
31
31
  export type CanonGenreCreationAttributes = Optional<CanonGenreAttributes, CanonGenreOptionalAttributes>;
32
32
 
33
33
  export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAttributes> implements CanonGenreAttributes {
34
+ id!: string;
34
35
  name!: string;
35
36
  asciiName!: string;
36
37
  description!: string;
37
38
  parentGenreId?: string;
38
- id!: string;
39
39
  createDate!: Date;
40
40
  updateDate!: Date;
41
41
 
@@ -210,6 +210,12 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
210
210
 
211
211
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenre {
212
212
  return CanonGenre.init({
213
+ id: {
214
+ type: DataTypes.UUID,
215
+ allowNull: false,
216
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
217
+ primaryKey: true
218
+ },
213
219
  name: {
214
220
  type: DataTypes.TEXT,
215
221
  allowNull: false,
@@ -229,12 +235,6 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
229
235
  allowNull: true,
230
236
  field: 'parent_genre_id'
231
237
  },
232
- id: {
233
- type: DataTypes.UUID,
234
- allowNull: false,
235
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
236
- primaryKey: true
237
- },
238
238
  createDate: {
239
239
  type: DataTypes.DATE,
240
240
  allowNull: false,
@@ -6,9 +6,9 @@ import type { ExternalReference, ExternalReferenceId } from './ExternalReference
6
6
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
7
7
 
8
8
  export interface CanonLabelAttributes {
9
+ id: string;
9
10
  name: string;
10
11
  asciiName: string;
11
- id: string;
12
12
  createDate: Date;
13
13
  updateDate: Date;
14
14
  }
@@ -19,9 +19,9 @@ export type CanonLabelOptionalAttributes = "id" | "createDate" | "updateDate";
19
19
  export type CanonLabelCreationAttributes = Optional<CanonLabelAttributes, CanonLabelOptionalAttributes>;
20
20
 
21
21
  export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAttributes> implements CanonLabelAttributes {
22
+ id!: string;
22
23
  name!: string;
23
24
  asciiName!: string;
24
- id!: string;
25
25
  createDate!: Date;
26
26
  updateDate!: Date;
27
27
 
@@ -76,6 +76,12 @@ export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAt
76
76
 
77
77
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonLabel {
78
78
  return CanonLabel.init({
79
+ id: {
80
+ type: DataTypes.UUID,
81
+ allowNull: false,
82
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
83
+ primaryKey: true
84
+ },
79
85
  name: {
80
86
  type: DataTypes.TEXT,
81
87
  allowNull: false
@@ -85,12 +91,6 @@ export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAt
85
91
  allowNull: false,
86
92
  field: 'ascii_name'
87
93
  },
88
- id: {
89
- type: DataTypes.UUID,
90
- allowNull: false,
91
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
92
- primaryKey: true
93
- },
94
94
  createDate: {
95
95
  type: DataTypes.DATE,
96
96
  allowNull: false,