@earbug/db-models 0.0.62 → 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 (128) hide show
  1. package/.dockerignore +10 -0
  2. package/.github/workflows/publish.yaml +303 -0
  3. package/.nvmrc +1 -0
  4. package/Dockerfile.generate +19 -0
  5. package/model_options.json +3 -0
  6. package/models/AccessControlPreference.ts +53 -0
  7. package/models/AffinityRelationshipType.ts +96 -0
  8. package/models/AffinityTier.ts +131 -0
  9. package/models/AppUser.ts +577 -0
  10. package/models/AppUserDevice.ts +101 -0
  11. package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
  12. package/models/AppUserFollowRelation.ts +128 -0
  13. package/models/AppUserPlatformRelation.ts +150 -0
  14. package/models/CanonAlbum.ts +229 -0
  15. package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
  16. package/models/CanonAlbumGenreRelation.ts +86 -0
  17. package/models/CanonAlbumLabelRelation.ts +86 -0
  18. package/models/CanonAlbumTrackRelation.ts +92 -0
  19. package/models/CanonArtist.ts +356 -0
  20. package/models/CanonArtistAlbumRelation.ts +92 -0
  21. package/models/CanonArtistExternalReferenceRelation.ts +92 -0
  22. package/models/CanonArtistGenreRelation.ts +86 -0
  23. package/models/CanonArtistMemberRelation.ts +86 -0
  24. package/models/CanonArtistTrackRelation.ts +92 -0
  25. package/models/CanonGenre.ts +273 -0
  26. package/models/CanonGenreExternalReferenceRelation.ts +92 -0
  27. package/models/CanonLabel.ts +129 -0
  28. package/models/CanonLabelExternalReferenceRelation.ts +92 -0
  29. package/models/CanonMember.ts +130 -0
  30. package/models/CanonMemberExternalReferenceRelation.ts +99 -0
  31. package/models/CanonToPlatformAlbumRelation.ts +92 -0
  32. package/models/CanonToPlatformArtistRelation.ts +92 -0
  33. package/models/CanonToPlatformGenreRelation.ts +86 -0
  34. package/models/CanonToPlatformTrackRelation.ts +92 -0
  35. package/models/CanonTrack.ts +232 -0
  36. package/models/ConfigParam.ts +62 -0
  37. package/models/ExternalReference.ts +201 -0
  38. package/models/FeedConfig.ts +65 -0
  39. package/models/FeedContentType.ts +124 -0
  40. package/models/GuestUser.ts +137 -0
  41. package/models/JukeboxAccessType.ts +60 -0
  42. package/models/JukeboxCanonGenreRelation.ts +108 -0
  43. package/models/JukeboxInvite.ts +125 -0
  44. package/models/JukeboxQueueEntry.ts +247 -0
  45. package/models/JukeboxQueueMode.ts +60 -0
  46. package/models/JukeboxSession.ts +334 -0
  47. package/models/JukeboxSessionArtistAffinity.ts +136 -0
  48. package/models/JukeboxSessionGenreAffinity.ts +136 -0
  49. package/models/JukeboxStatus.ts +58 -0
  50. package/models/JukeboxTerminationCondition.ts +60 -0
  51. package/models/JukeboxType.ts +60 -0
  52. package/models/JukeboxUser.ts +182 -0
  53. package/models/JukeboxUserType.ts +58 -0
  54. package/models/KnexMigrations.ts +60 -0
  55. package/models/KnexMigrationsLock.ts +48 -0
  56. package/models/MerchItem.ts +198 -0
  57. package/models/MerchOrchestration.ts +130 -0
  58. package/models/MerchPlatform.ts +95 -0
  59. package/models/MerchType.ts +89 -0
  60. package/models/MetricsDaily.ts +79 -0
  61. package/models/MetricsEvent.ts +124 -0
  62. package/models/NewsArticle.ts +177 -0
  63. package/models/NewsPlatform.ts +76 -0
  64. package/models/NewsSite.ts +75 -0
  65. package/models/Notification.ts +214 -0
  66. package/models/NotificationType.ts +66 -0
  67. package/models/PauseStatusType.ts +58 -0
  68. package/models/Platform.ts +189 -0
  69. package/models/PlatformAlbum.ts +398 -0
  70. package/models/PlatformAlbumGenreRelation.ts +86 -0
  71. package/models/PlatformAlbumTrackRelation.ts +92 -0
  72. package/models/PlatformArtist.ts +358 -0
  73. package/models/PlatformArtistAlbumRelation.ts +92 -0
  74. package/models/PlatformArtistGenreRelation.ts +86 -0
  75. package/models/PlatformArtistTrackRelation.ts +92 -0
  76. package/models/PlatformGenre.ts +194 -0
  77. package/models/PlatformTrack.ts +339 -0
  78. package/models/PlatformTrackGenreRelation.ts +86 -0
  79. package/models/PlatformUserAlbum.ts +152 -0
  80. package/models/PlatformUserAlbumTrack.ts +138 -0
  81. package/models/PlatformUserPlaylist.ts +260 -0
  82. package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
  83. package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
  84. package/models/PlatformUserPlaylistTrack.ts +162 -0
  85. package/models/PlaybackStatus.ts +47 -0
  86. package/models/PlaybackStatusType.ts +58 -0
  87. package/models/RadioShow.ts +209 -0
  88. package/models/RadioShowGenres.ts +107 -0
  89. package/models/RadioShowMedia.ts +181 -0
  90. package/models/RadioShowPlacement.ts +115 -0
  91. package/models/RadioShowPublishRequests.ts +86 -0
  92. package/models/State.ts +86 -0
  93. package/models/TrackDeletionReason.ts +58 -0
  94. package/models/UnmatchedAlbum.ts +66 -0
  95. package/models/UnmatchedArtist.ts +81 -0
  96. package/models/UserAbuseReports.ts +232 -0
  97. package/models/UserAffinity.ts +117 -0
  98. package/models/UserArtistAffinity.ts +136 -0
  99. package/models/UserBookmarks.ts +235 -0
  100. package/models/UserComments.ts +271 -0
  101. package/models/UserContacts.ts +155 -0
  102. package/models/UserEngagementFactor.ts +109 -0
  103. package/models/UserGenreAffinity.ts +136 -0
  104. package/models/UserLikes.ts +235 -0
  105. package/models/UserMessages.ts +189 -0
  106. package/models/Versus.ts +438 -0
  107. package/models/VersusAccessType.ts +66 -0
  108. package/models/VersusCoCreator.ts +111 -0
  109. package/models/VersusCreatorScope.ts +66 -0
  110. package/models/VersusEndMode.ts +66 -0
  111. package/models/VersusEndTimerDuration.ts +81 -0
  112. package/models/VersusEndVoteThreshold.ts +67 -0
  113. package/models/VersusEntityKind.ts +79 -0
  114. package/models/VersusOption.ts +258 -0
  115. package/models/VersusPublishIssue.ts +146 -0
  116. package/models/VersusQuestion.ts +123 -0
  117. package/models/VersusQuestionVariableType.ts +66 -0
  118. package/models/VersusVote.ts +99 -0
  119. package/models/VersusVotingListType.ts +66 -0
  120. package/models/VersusVotingMode.ts +66 -0
  121. package/models/index.ts +3 -0
  122. package/models/init-models.ts +1259 -0
  123. package/models/initDb.ts +72 -0
  124. package/models/rdsCaBundle.ts +5 -0
  125. package/package.json +2 -5
  126. package/scripts/generate-and-upload.mjs +123 -0
  127. package/scripts/update-rds-ca-bundle.mjs +44 -0
  128. package/tsconfig.json +52 -0
@@ -0,0 +1,76 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { NewsArticle, NewsArticleId } from './NewsArticle';
4
+
5
+ export interface NewsPlatformAttributes {
6
+ id: string;
7
+ name: string;
8
+ createDate: Date;
9
+ updateDate: Date;
10
+ }
11
+
12
+ export type NewsPlatformPk = "id";
13
+ export type NewsPlatformId = NewsPlatform[NewsPlatformPk];
14
+ export type NewsPlatformOptionalAttributes = "id" | "createDate" | "updateDate";
15
+ export type NewsPlatformCreationAttributes = Optional<NewsPlatformAttributes, NewsPlatformOptionalAttributes>;
16
+
17
+ export class NewsPlatform extends Model<NewsPlatformAttributes, NewsPlatformCreationAttributes> implements NewsPlatformAttributes {
18
+ id!: string;
19
+ name!: string;
20
+ createDate!: Date;
21
+ updateDate!: Date;
22
+
23
+ // NewsPlatform hasMany NewsArticle via newsPlatformId
24
+ newsArticles!: NewsArticle[];
25
+ getNewsArticles!: Sequelize.HasManyGetAssociationsMixin<NewsArticle>;
26
+ setNewsArticles!: Sequelize.HasManySetAssociationsMixin<NewsArticle, NewsArticleId>;
27
+ addNewsArticle!: Sequelize.HasManyAddAssociationMixin<NewsArticle, NewsArticleId>;
28
+ addNewsArticles!: Sequelize.HasManyAddAssociationsMixin<NewsArticle, NewsArticleId>;
29
+ createNewsArticle!: Sequelize.HasManyCreateAssociationMixin<NewsArticle>;
30
+ removeNewsArticle!: Sequelize.HasManyRemoveAssociationMixin<NewsArticle, NewsArticleId>;
31
+ removeNewsArticles!: Sequelize.HasManyRemoveAssociationsMixin<NewsArticle, NewsArticleId>;
32
+ hasNewsArticle!: Sequelize.HasManyHasAssociationMixin<NewsArticle, NewsArticleId>;
33
+ hasNewsArticles!: Sequelize.HasManyHasAssociationsMixin<NewsArticle, NewsArticleId>;
34
+ countNewsArticles!: Sequelize.HasManyCountAssociationsMixin;
35
+
36
+ static initModel(sequelize: Sequelize.Sequelize): typeof NewsPlatform {
37
+ return NewsPlatform.init({
38
+ id: {
39
+ type: DataTypes.UUID,
40
+ allowNull: false,
41
+ defaultValue: DataTypes.UUIDV4,
42
+ primaryKey: true
43
+ },
44
+ name: {
45
+ type: DataTypes.TEXT,
46
+ allowNull: false
47
+ },
48
+ createDate: {
49
+ type: DataTypes.DATE,
50
+ allowNull: false,
51
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
52
+ field: 'create_date'
53
+ },
54
+ updateDate: {
55
+ type: DataTypes.DATE,
56
+ allowNull: false,
57
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
58
+ field: 'update_date'
59
+ }
60
+ }, {
61
+ sequelize,
62
+ tableName: 'news_platform',
63
+ schema: 'eb',
64
+ timestamps: false,
65
+ indexes: [
66
+ {
67
+ name: "news_platform_pkey",
68
+ unique: true,
69
+ fields: [
70
+ { name: "id" },
71
+ ]
72
+ },
73
+ ]
74
+ });
75
+ }
76
+ }
@@ -0,0 +1,75 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+
4
+ export interface NewsSiteAttributes {
5
+ id: number;
6
+ name: string;
7
+ domain?: string;
8
+ scrapingBaseUrl: string;
9
+ active?: boolean;
10
+ }
11
+
12
+ export type NewsSitePk = "id";
13
+ export type NewsSiteId = NewsSite[NewsSitePk];
14
+ export type NewsSiteOptionalAttributes = "id" | "domain" | "active";
15
+ export type NewsSiteCreationAttributes = Optional<NewsSiteAttributes, NewsSiteOptionalAttributes>;
16
+
17
+ export class NewsSite extends Model<NewsSiteAttributes, NewsSiteCreationAttributes> implements NewsSiteAttributes {
18
+ id!: number;
19
+ name!: string;
20
+ domain?: string;
21
+ scrapingBaseUrl!: string;
22
+ active?: boolean;
23
+
24
+
25
+ static initModel(sequelize: Sequelize.Sequelize): typeof NewsSite {
26
+ return NewsSite.init({
27
+ id: {
28
+ autoIncrement: true,
29
+ type: DataTypes.INTEGER,
30
+ allowNull: false,
31
+ primaryKey: true
32
+ },
33
+ name: {
34
+ type: DataTypes.STRING(255),
35
+ allowNull: false,
36
+ unique: "news_site_name_unique"
37
+ },
38
+ domain: {
39
+ type: DataTypes.STRING(255),
40
+ allowNull: true
41
+ },
42
+ scrapingBaseUrl: {
43
+ type: DataTypes.STRING(255),
44
+ allowNull: false,
45
+ field: 'scraping_base_url'
46
+ },
47
+ active: {
48
+ type: DataTypes.BOOLEAN,
49
+ allowNull: true,
50
+ defaultValue: false
51
+ }
52
+ }, {
53
+ sequelize,
54
+ tableName: 'news_site',
55
+ schema: 'eb',
56
+ timestamps: false,
57
+ indexes: [
58
+ {
59
+ name: "news_site_name_unique",
60
+ unique: true,
61
+ fields: [
62
+ { name: "name" },
63
+ ]
64
+ },
65
+ {
66
+ name: "news_site_pkey",
67
+ unique: true,
68
+ fields: [
69
+ { name: "id" },
70
+ ]
71
+ },
72
+ ]
73
+ });
74
+ }
75
+ }
@@ -0,0 +1,214 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
5
+ import type { NotificationType, NotificationTypeId } from './NotificationType';
6
+
7
+ export interface NotificationAttributes {
8
+ id: string;
9
+ targetUserId: string;
10
+ notificationTypeId: number;
11
+ metadata?: object;
12
+ isRead: boolean;
13
+ readAt?: Date;
14
+ isDismissed: boolean;
15
+ dismissedAt?: Date;
16
+ sourceUserId?: string;
17
+ jukeboxSessionId?: string;
18
+ createdAt: Date;
19
+ updatedAt: Date;
20
+ expiresAt?: Date;
21
+ pushSent: boolean;
22
+ pushSentAt?: Date;
23
+ pushError?: string;
24
+ }
25
+
26
+ export type NotificationPk = "id";
27
+ export type NotificationId = Notification[NotificationPk];
28
+ export type NotificationOptionalAttributes = "id" | "metadata" | "readAt" | "dismissedAt" | "sourceUserId" | "jukeboxSessionId" | "createdAt" | "updatedAt" | "expiresAt" | "pushSentAt" | "pushError";
29
+ export type NotificationCreationAttributes = Optional<NotificationAttributes, NotificationOptionalAttributes>;
30
+
31
+ export class Notification extends Model<NotificationAttributes, NotificationCreationAttributes> implements NotificationAttributes {
32
+ id!: string;
33
+ targetUserId!: string;
34
+ notificationTypeId!: number;
35
+ metadata?: object;
36
+ isRead!: boolean;
37
+ readAt?: Date;
38
+ isDismissed!: boolean;
39
+ dismissedAt?: Date;
40
+ sourceUserId?: string;
41
+ jukeboxSessionId?: string;
42
+ createdAt!: Date;
43
+ updatedAt!: Date;
44
+ expiresAt?: Date;
45
+ pushSent!: boolean;
46
+ pushSentAt?: Date;
47
+ pushError?: string;
48
+
49
+ // Notification belongsTo AppUser via sourceUserId
50
+ sourceUser!: AppUser;
51
+ getSourceUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
52
+ setSourceUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
53
+ createSourceUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
54
+ // Notification belongsTo AppUser via targetUserId
55
+ targetUser!: AppUser;
56
+ getTargetUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
57
+ setTargetUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
58
+ createTargetUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
59
+ // Notification belongsTo JukeboxSession via jukeboxSessionId
60
+ jukeboxSession!: JukeboxSession;
61
+ getJukeboxSession!: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
62
+ setJukeboxSession!: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
63
+ createJukeboxSession!: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
64
+ // Notification belongsTo NotificationType via notificationTypeId
65
+ notificationType!: NotificationType;
66
+ getNotificationType!: Sequelize.BelongsToGetAssociationMixin<NotificationType>;
67
+ setNotificationType!: Sequelize.BelongsToSetAssociationMixin<NotificationType, NotificationTypeId>;
68
+ createNotificationType!: Sequelize.BelongsToCreateAssociationMixin<NotificationType>;
69
+
70
+ static initModel(sequelize: Sequelize.Sequelize): typeof Notification {
71
+ return Notification.init({
72
+ id: {
73
+ type: DataTypes.UUID,
74
+ allowNull: false,
75
+ defaultValue: DataTypes.UUIDV4,
76
+ primaryKey: true
77
+ },
78
+ targetUserId: {
79
+ type: DataTypes.UUID,
80
+ allowNull: false,
81
+ references: {
82
+ model: 'app_user',
83
+ key: 'id'
84
+ },
85
+ field: 'target_user_id'
86
+ },
87
+ notificationTypeId: {
88
+ type: DataTypes.SMALLINT,
89
+ allowNull: false,
90
+ references: {
91
+ model: 'notification_type',
92
+ key: 'id'
93
+ },
94
+ field: 'notification_type_id'
95
+ },
96
+ metadata: {
97
+ type: DataTypes.JSONB,
98
+ allowNull: true
99
+ },
100
+ isRead: {
101
+ type: DataTypes.BOOLEAN,
102
+ allowNull: false,
103
+ defaultValue: false,
104
+ field: 'is_read'
105
+ },
106
+ readAt: {
107
+ type: DataTypes.DATE,
108
+ allowNull: true,
109
+ field: 'read_at'
110
+ },
111
+ isDismissed: {
112
+ type: DataTypes.BOOLEAN,
113
+ allowNull: false,
114
+ defaultValue: false,
115
+ field: 'is_dismissed'
116
+ },
117
+ dismissedAt: {
118
+ type: DataTypes.DATE,
119
+ allowNull: true,
120
+ field: 'dismissed_at'
121
+ },
122
+ sourceUserId: {
123
+ type: DataTypes.UUID,
124
+ allowNull: true,
125
+ references: {
126
+ model: 'app_user',
127
+ key: 'id'
128
+ },
129
+ field: 'source_user_id'
130
+ },
131
+ jukeboxSessionId: {
132
+ type: DataTypes.UUID,
133
+ allowNull: true,
134
+ references: {
135
+ model: 'jukebox_session',
136
+ key: 'id'
137
+ },
138
+ field: 'jukebox_session_id'
139
+ },
140
+ createdAt: {
141
+ type: DataTypes.DATE,
142
+ allowNull: false,
143
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
144
+ field: 'created_at'
145
+ },
146
+ updatedAt: {
147
+ type: DataTypes.DATE,
148
+ allowNull: false,
149
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
150
+ field: 'updated_at'
151
+ },
152
+ expiresAt: {
153
+ type: DataTypes.DATE,
154
+ allowNull: true,
155
+ field: 'expires_at'
156
+ },
157
+ pushSent: {
158
+ type: DataTypes.BOOLEAN,
159
+ allowNull: false,
160
+ defaultValue: false,
161
+ field: 'push_sent'
162
+ },
163
+ pushSentAt: {
164
+ type: DataTypes.DATE,
165
+ allowNull: true,
166
+ field: 'push_sent_at'
167
+ },
168
+ pushError: {
169
+ type: DataTypes.TEXT,
170
+ allowNull: true,
171
+ field: 'push_error'
172
+ }
173
+ }, {
174
+ sequelize,
175
+ tableName: 'notification',
176
+ schema: 'eb',
177
+ timestamps: false,
178
+ indexes: [
179
+ {
180
+ name: "idx_notification_expires_at",
181
+ fields: [
182
+ { name: "expires_at" },
183
+ ]
184
+ },
185
+ {
186
+ name: "idx_notification_session",
187
+ fields: [
188
+ { name: "jukebox_session_id" },
189
+ ]
190
+ },
191
+ {
192
+ name: "idx_notification_source_user",
193
+ fields: [
194
+ { name: "source_user_id" },
195
+ ]
196
+ },
197
+ {
198
+ name: "idx_notification_target_user_created_at",
199
+ fields: [
200
+ { name: "target_user_id" },
201
+ { name: "created_at", order: "DESC" },
202
+ ]
203
+ },
204
+ {
205
+ name: "notification_pkey",
206
+ unique: true,
207
+ fields: [
208
+ { name: "id" },
209
+ ]
210
+ },
211
+ ]
212
+ });
213
+ }
214
+ }
@@ -0,0 +1,66 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { Notification, NotificationId } from './Notification';
4
+
5
+ export interface NotificationTypeAttributes {
6
+ id: number;
7
+ name: string;
8
+ }
9
+
10
+ export type NotificationTypePk = "id";
11
+ export type NotificationTypeId = NotificationType[NotificationTypePk];
12
+ export type NotificationTypeCreationAttributes = NotificationTypeAttributes;
13
+
14
+ export class NotificationType extends Model<NotificationTypeAttributes, NotificationTypeCreationAttributes> implements NotificationTypeAttributes {
15
+ id!: number;
16
+ name!: string;
17
+
18
+ // NotificationType hasMany Notification via notificationTypeId
19
+ notifications!: Notification[];
20
+ getNotifications!: Sequelize.HasManyGetAssociationsMixin<Notification>;
21
+ setNotifications!: Sequelize.HasManySetAssociationsMixin<Notification, NotificationId>;
22
+ addNotification!: Sequelize.HasManyAddAssociationMixin<Notification, NotificationId>;
23
+ addNotifications!: Sequelize.HasManyAddAssociationsMixin<Notification, NotificationId>;
24
+ createNotification!: Sequelize.HasManyCreateAssociationMixin<Notification>;
25
+ removeNotification!: Sequelize.HasManyRemoveAssociationMixin<Notification, NotificationId>;
26
+ removeNotifications!: Sequelize.HasManyRemoveAssociationsMixin<Notification, NotificationId>;
27
+ hasNotification!: Sequelize.HasManyHasAssociationMixin<Notification, NotificationId>;
28
+ hasNotifications!: Sequelize.HasManyHasAssociationsMixin<Notification, NotificationId>;
29
+ countNotifications!: Sequelize.HasManyCountAssociationsMixin;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof NotificationType {
32
+ return NotificationType.init({
33
+ id: {
34
+ type: DataTypes.SMALLINT,
35
+ allowNull: false,
36
+ primaryKey: true
37
+ },
38
+ name: {
39
+ type: DataTypes.TEXT,
40
+ allowNull: false,
41
+ unique: "notification_type_name_unique"
42
+ }
43
+ }, {
44
+ sequelize,
45
+ tableName: 'notification_type',
46
+ schema: 'eb',
47
+ timestamps: false,
48
+ indexes: [
49
+ {
50
+ name: "notification_type_name_unique",
51
+ unique: true,
52
+ fields: [
53
+ { name: "name" },
54
+ ]
55
+ },
56
+ {
57
+ name: "notification_type_pkey",
58
+ unique: true,
59
+ fields: [
60
+ { name: "id" },
61
+ ]
62
+ },
63
+ ]
64
+ });
65
+ }
66
+ }
@@ -0,0 +1,58 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
4
+
5
+ export interface PauseStatusTypeAttributes {
6
+ id: number;
7
+ description: string;
8
+ }
9
+
10
+ export type PauseStatusTypePk = "id";
11
+ export type PauseStatusTypeId = PauseStatusType[PauseStatusTypePk];
12
+ export type PauseStatusTypeCreationAttributes = PauseStatusTypeAttributes;
13
+
14
+ export class PauseStatusType extends Model<PauseStatusTypeAttributes, PauseStatusTypeCreationAttributes> implements PauseStatusTypeAttributes {
15
+ id!: number;
16
+ description!: string;
17
+
18
+ // PauseStatusType hasMany JukeboxUser via pauseStatusTypeId
19
+ jukeboxUsers!: JukeboxUser[];
20
+ getJukeboxUsers!: Sequelize.HasManyGetAssociationsMixin<JukeboxUser>;
21
+ setJukeboxUsers!: Sequelize.HasManySetAssociationsMixin<JukeboxUser, JukeboxUserId>;
22
+ addJukeboxUser!: Sequelize.HasManyAddAssociationMixin<JukeboxUser, JukeboxUserId>;
23
+ addJukeboxUsers!: Sequelize.HasManyAddAssociationsMixin<JukeboxUser, JukeboxUserId>;
24
+ createJukeboxUser!: Sequelize.HasManyCreateAssociationMixin<JukeboxUser>;
25
+ removeJukeboxUser!: Sequelize.HasManyRemoveAssociationMixin<JukeboxUser, JukeboxUserId>;
26
+ removeJukeboxUsers!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxUser, JukeboxUserId>;
27
+ hasJukeboxUser!: Sequelize.HasManyHasAssociationMixin<JukeboxUser, JukeboxUserId>;
28
+ hasJukeboxUsers!: Sequelize.HasManyHasAssociationsMixin<JukeboxUser, JukeboxUserId>;
29
+ countJukeboxUsers!: Sequelize.HasManyCountAssociationsMixin;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof PauseStatusType {
32
+ return PauseStatusType.init({
33
+ id: {
34
+ type: DataTypes.SMALLINT,
35
+ allowNull: false,
36
+ primaryKey: true
37
+ },
38
+ description: {
39
+ type: DataTypes.STRING(255),
40
+ allowNull: false
41
+ }
42
+ }, {
43
+ sequelize,
44
+ tableName: 'pause_status_type',
45
+ schema: 'eb',
46
+ timestamps: false,
47
+ indexes: [
48
+ {
49
+ name: "pause_status_type_pkey",
50
+ unique: true,
51
+ fields: [
52
+ { name: "id" },
53
+ ]
54
+ },
55
+ ]
56
+ });
57
+ }
58
+ }
@@ -0,0 +1,189 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUserPlatformRelation, AppUserPlatformRelationId } from './AppUserPlatformRelation';
4
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
5
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
6
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
7
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
8
+ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
9
+ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
10
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
11
+ import type { UnmatchedArtist, UnmatchedArtistId } from './UnmatchedArtist';
12
+
13
+ export interface PlatformAttributes {
14
+ id: number;
15
+ name: string;
16
+ createDate: Date;
17
+ updateDate: Date;
18
+ }
19
+
20
+ export type PlatformPk = "id";
21
+ export type PlatformId = Platform[PlatformPk];
22
+ export type PlatformOptionalAttributes = "createDate" | "updateDate";
23
+ export type PlatformCreationAttributes = Optional<PlatformAttributes, PlatformOptionalAttributes>;
24
+
25
+ export class Platform extends Model<PlatformAttributes, PlatformCreationAttributes> implements PlatformAttributes {
26
+ id!: number;
27
+ name!: string;
28
+ createDate!: Date;
29
+ updateDate!: Date;
30
+
31
+ // Platform hasMany AppUserPlatformRelation via platformId
32
+ appUserPlatformRelations!: AppUserPlatformRelation[];
33
+ getAppUserPlatformRelations!: Sequelize.HasManyGetAssociationsMixin<AppUserPlatformRelation>;
34
+ setAppUserPlatformRelations!: Sequelize.HasManySetAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
35
+ addAppUserPlatformRelation!: Sequelize.HasManyAddAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
36
+ addAppUserPlatformRelations!: Sequelize.HasManyAddAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
37
+ createAppUserPlatformRelation!: Sequelize.HasManyCreateAssociationMixin<AppUserPlatformRelation>;
38
+ removeAppUserPlatformRelation!: Sequelize.HasManyRemoveAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
39
+ removeAppUserPlatformRelations!: Sequelize.HasManyRemoveAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
40
+ hasAppUserPlatformRelation!: Sequelize.HasManyHasAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
41
+ hasAppUserPlatformRelations!: Sequelize.HasManyHasAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
42
+ countAppUserPlatformRelations!: Sequelize.HasManyCountAssociationsMixin;
43
+ // Platform hasMany PlatformAlbum via platformId
44
+ platformAlbums!: PlatformAlbum[];
45
+ getPlatformAlbums!: Sequelize.HasManyGetAssociationsMixin<PlatformAlbum>;
46
+ setPlatformAlbums!: Sequelize.HasManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
47
+ addPlatformAlbum!: Sequelize.HasManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
48
+ addPlatformAlbums!: Sequelize.HasManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
49
+ createPlatformAlbum!: Sequelize.HasManyCreateAssociationMixin<PlatformAlbum>;
50
+ removePlatformAlbum!: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
51
+ removePlatformAlbums!: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
52
+ hasPlatformAlbum!: Sequelize.HasManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
53
+ hasPlatformAlbums!: Sequelize.HasManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
54
+ countPlatformAlbums!: Sequelize.HasManyCountAssociationsMixin;
55
+ // Platform hasMany PlatformArtist via platformId
56
+ platformArtists!: PlatformArtist[];
57
+ getPlatformArtists!: Sequelize.HasManyGetAssociationsMixin<PlatformArtist>;
58
+ setPlatformArtists!: Sequelize.HasManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
59
+ addPlatformArtist!: Sequelize.HasManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
60
+ addPlatformArtists!: Sequelize.HasManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
61
+ createPlatformArtist!: Sequelize.HasManyCreateAssociationMixin<PlatformArtist>;
62
+ removePlatformArtist!: Sequelize.HasManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
63
+ removePlatformArtists!: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
64
+ hasPlatformArtist!: Sequelize.HasManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
65
+ hasPlatformArtists!: Sequelize.HasManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
66
+ countPlatformArtists!: Sequelize.HasManyCountAssociationsMixin;
67
+ // Platform hasMany PlatformGenre via platformId
68
+ platformGenres!: PlatformGenre[];
69
+ getPlatformGenres!: Sequelize.HasManyGetAssociationsMixin<PlatformGenre>;
70
+ setPlatformGenres!: Sequelize.HasManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
71
+ addPlatformGenre!: Sequelize.HasManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
72
+ addPlatformGenres!: Sequelize.HasManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
73
+ createPlatformGenre!: Sequelize.HasManyCreateAssociationMixin<PlatformGenre>;
74
+ removePlatformGenre!: Sequelize.HasManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
75
+ removePlatformGenres!: Sequelize.HasManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
76
+ hasPlatformGenre!: Sequelize.HasManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
77
+ hasPlatformGenres!: Sequelize.HasManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
78
+ countPlatformGenres!: Sequelize.HasManyCountAssociationsMixin;
79
+ // Platform hasMany PlatformTrack via platformId
80
+ platformTracks!: PlatformTrack[];
81
+ getPlatformTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformTrack>;
82
+ setPlatformTracks!: Sequelize.HasManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
83
+ addPlatformTrack!: Sequelize.HasManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
84
+ addPlatformTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
85
+ createPlatformTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformTrack>;
86
+ removePlatformTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
87
+ removePlatformTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
88
+ hasPlatformTrack!: Sequelize.HasManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
89
+ hasPlatformTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
90
+ countPlatformTracks!: Sequelize.HasManyCountAssociationsMixin;
91
+ // Platform hasMany PlatformUserAlbum via platformId
92
+ platformUserAlbums!: PlatformUserAlbum[];
93
+ getPlatformUserAlbums!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbum>;
94
+ setPlatformUserAlbums!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
95
+ addPlatformUserAlbum!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
96
+ addPlatformUserAlbums!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
97
+ createPlatformUserAlbum!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbum>;
98
+ removePlatformUserAlbum!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
99
+ removePlatformUserAlbums!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
100
+ hasPlatformUserAlbum!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
101
+ hasPlatformUserAlbums!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
102
+ countPlatformUserAlbums!: Sequelize.HasManyCountAssociationsMixin;
103
+ // Platform hasMany PlatformUserAlbumTrack via platformId
104
+ platformUserAlbumTracks!: PlatformUserAlbumTrack[];
105
+ getPlatformUserAlbumTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbumTrack>;
106
+ setPlatformUserAlbumTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
107
+ addPlatformUserAlbumTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
108
+ addPlatformUserAlbumTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
109
+ createPlatformUserAlbumTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbumTrack>;
110
+ removePlatformUserAlbumTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
111
+ removePlatformUserAlbumTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
112
+ hasPlatformUserAlbumTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
113
+ hasPlatformUserAlbumTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
114
+ countPlatformUserAlbumTracks!: Sequelize.HasManyCountAssociationsMixin;
115
+ // Platform hasMany PlatformUserPlaylist via platformId
116
+ platformUserPlaylists!: PlatformUserPlaylist[];
117
+ getPlatformUserPlaylists!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylist>;
118
+ setPlatformUserPlaylists!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
119
+ addPlatformUserPlaylist!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
120
+ addPlatformUserPlaylists!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
121
+ createPlatformUserPlaylist!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylist>;
122
+ removePlatformUserPlaylist!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
123
+ removePlatformUserPlaylists!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
124
+ hasPlatformUserPlaylist!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
125
+ hasPlatformUserPlaylists!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
126
+ countPlatformUserPlaylists!: Sequelize.HasManyCountAssociationsMixin;
127
+ // Platform hasMany UnmatchedArtist via platformId
128
+ unmatchedArtists!: UnmatchedArtist[];
129
+ getUnmatchedArtists!: Sequelize.HasManyGetAssociationsMixin<UnmatchedArtist>;
130
+ setUnmatchedArtists!: Sequelize.HasManySetAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
131
+ addUnmatchedArtist!: Sequelize.HasManyAddAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
132
+ addUnmatchedArtists!: Sequelize.HasManyAddAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
133
+ createUnmatchedArtist!: Sequelize.HasManyCreateAssociationMixin<UnmatchedArtist>;
134
+ removeUnmatchedArtist!: Sequelize.HasManyRemoveAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
135
+ removeUnmatchedArtists!: Sequelize.HasManyRemoveAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
136
+ hasUnmatchedArtist!: Sequelize.HasManyHasAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
137
+ hasUnmatchedArtists!: Sequelize.HasManyHasAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
138
+ countUnmatchedArtists!: Sequelize.HasManyCountAssociationsMixin;
139
+
140
+ static initModel(sequelize: Sequelize.Sequelize): typeof Platform {
141
+ return Platform.init({
142
+ id: {
143
+ autoIncrement: true,
144
+ autoIncrementIdentity: true,
145
+ type: DataTypes.SMALLINT,
146
+ allowNull: false,
147
+ primaryKey: true
148
+ },
149
+ name: {
150
+ type: DataTypes.TEXT,
151
+ allowNull: false,
152
+ unique: "uk_name"
153
+ },
154
+ createDate: {
155
+ type: DataTypes.DATE,
156
+ allowNull: false,
157
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
158
+ field: 'create_date'
159
+ },
160
+ updateDate: {
161
+ type: DataTypes.DATE,
162
+ allowNull: false,
163
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
164
+ field: 'update_date'
165
+ }
166
+ }, {
167
+ sequelize,
168
+ tableName: 'platform',
169
+ schema: 'eb',
170
+ timestamps: false,
171
+ indexes: [
172
+ {
173
+ name: "external_source_pkey",
174
+ unique: true,
175
+ fields: [
176
+ { name: "id" },
177
+ ]
178
+ },
179
+ {
180
+ name: "uk_name",
181
+ unique: true,
182
+ fields: [
183
+ { name: "name" },
184
+ ]
185
+ },
186
+ ]
187
+ });
188
+ }
189
+ }