@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,107 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
4
+ import type { RadioShow, RadioShowId } from './RadioShow';
5
+
6
+ export interface RadioShowGenresAttributes {
7
+ canonGenreId: string;
8
+ radioShowId: string;
9
+ title: string;
10
+ id: string;
11
+ seqNum?: number;
12
+ }
13
+
14
+ export type RadioShowGenresPk = "id";
15
+ export type RadioShowGenresId = RadioShowGenres[RadioShowGenresPk];
16
+ export type RadioShowGenresOptionalAttributes = "id" | "seqNum";
17
+ export type RadioShowGenresCreationAttributes = Optional<RadioShowGenresAttributes, RadioShowGenresOptionalAttributes>;
18
+
19
+ export class RadioShowGenres extends Model<RadioShowGenresAttributes, RadioShowGenresCreationAttributes> implements RadioShowGenresAttributes {
20
+ canonGenreId!: string;
21
+ radioShowId!: string;
22
+ title!: string;
23
+ id!: string;
24
+ seqNum?: number;
25
+
26
+ // RadioShowGenres belongsTo CanonGenre via canonGenreId
27
+ canonGenre!: CanonGenre;
28
+ getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
29
+ setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
30
+ createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
31
+ // RadioShowGenres belongsTo RadioShow via radioShowId
32
+ radioShow!: RadioShow;
33
+ getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
34
+ setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
35
+ createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
36
+
37
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowGenres {
38
+ return RadioShowGenres.init({
39
+ canonGenreId: {
40
+ type: DataTypes.UUID,
41
+ allowNull: false,
42
+ references: {
43
+ model: 'canon_genre',
44
+ key: 'id'
45
+ },
46
+ unique: "uq_radio_show_genre_unique",
47
+ field: 'canon_genre_id'
48
+ },
49
+ radioShowId: {
50
+ type: DataTypes.UUID,
51
+ allowNull: false,
52
+ references: {
53
+ model: 'radio_show',
54
+ key: 'id'
55
+ },
56
+ unique: "uq_radio_show_genre_unique",
57
+ field: 'radio_show_id'
58
+ },
59
+ title: {
60
+ type: DataTypes.STRING(40),
61
+ allowNull: false
62
+ },
63
+ id: {
64
+ type: DataTypes.UUID,
65
+ allowNull: false,
66
+ defaultValue: DataTypes.UUIDV4,
67
+ primaryKey: true
68
+ },
69
+ seqNum: {
70
+ type: DataTypes.SMALLINT,
71
+ allowNull: true,
72
+ unique: "uq_radio_show_genre_seq_unique",
73
+ field: 'seq_num'
74
+ }
75
+ }, {
76
+ sequelize,
77
+ tableName: 'radio_show_genres',
78
+ schema: 'eb',
79
+ timestamps: false,
80
+ indexes: [
81
+ {
82
+ name: "radio_show_genres_pkey",
83
+ unique: true,
84
+ fields: [
85
+ { name: "id" },
86
+ ]
87
+ },
88
+ {
89
+ name: "uq_radio_show_genre_seq_unique",
90
+ unique: true,
91
+ fields: [
92
+ { name: "radio_show_id" },
93
+ { name: "seq_num" },
94
+ ]
95
+ },
96
+ {
97
+ name: "uq_radio_show_genre_unique",
98
+ unique: true,
99
+ fields: [
100
+ { name: "radio_show_id" },
101
+ { name: "canon_genre_id" },
102
+ ]
103
+ },
104
+ ]
105
+ });
106
+ }
107
+ }
@@ -0,0 +1,181 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { RadioShow, RadioShowId } from './RadioShow';
4
+ import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
5
+
6
+ export interface RadioShowMediaAttributes {
7
+ id: string;
8
+ radioShowId: string;
9
+ originalMediaType?: number;
10
+ s3VideoUrl?: string;
11
+ s3AudioUrl: string;
12
+ createDate: Date;
13
+ description?: string;
14
+ cropInstructions?: string;
15
+ deleted?: boolean;
16
+ sourceS3Key?: string;
17
+ isAppRecorded?: boolean;
18
+ automatedModerationApproved?: boolean;
19
+ automatedModerationRejectionMetadata?: object;
20
+ automatedModerationDecidedAt?: Date;
21
+ manualModerationApproved?: boolean;
22
+ manualModerationDecidedAt?: Date;
23
+ manualModerationBy?: string;
24
+ }
25
+
26
+ export type RadioShowMediaPk = "id";
27
+ export type RadioShowMediaId = RadioShowMedia[RadioShowMediaPk];
28
+ export type RadioShowMediaOptionalAttributes = "id" | "originalMediaType" | "s3VideoUrl" | "createDate" | "description" | "cropInstructions" | "deleted" | "sourceS3Key" | "isAppRecorded" | "automatedModerationApproved" | "automatedModerationRejectionMetadata" | "automatedModerationDecidedAt" | "manualModerationApproved" | "manualModerationDecidedAt" | "manualModerationBy";
29
+ export type RadioShowMediaCreationAttributes = Optional<RadioShowMediaAttributes, RadioShowMediaOptionalAttributes>;
30
+
31
+ export class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMediaCreationAttributes> implements RadioShowMediaAttributes {
32
+ id!: string;
33
+ radioShowId!: string;
34
+ originalMediaType?: number;
35
+ s3VideoUrl?: string;
36
+ s3AudioUrl!: string;
37
+ createDate!: Date;
38
+ description?: string;
39
+ cropInstructions?: string;
40
+ deleted?: boolean;
41
+ sourceS3Key?: string;
42
+ isAppRecorded?: boolean;
43
+ automatedModerationApproved?: boolean;
44
+ automatedModerationRejectionMetadata?: object;
45
+ automatedModerationDecidedAt?: Date;
46
+ manualModerationApproved?: boolean;
47
+ manualModerationDecidedAt?: Date;
48
+ manualModerationBy?: string;
49
+
50
+ // RadioShowMedia belongsTo RadioShow via radioShowId
51
+ radioShow!: RadioShow;
52
+ getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
53
+ setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
54
+ createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
55
+ // RadioShowMedia hasMany UserAbuseReports via radioShowMediaId
56
+ userAbuseReports!: UserAbuseReports[];
57
+ getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
58
+ setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
59
+ addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
60
+ addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
61
+ createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
62
+ removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
63
+ removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
64
+ hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
65
+ hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
66
+ countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
67
+
68
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowMedia {
69
+ return RadioShowMedia.init({
70
+ id: {
71
+ type: DataTypes.UUID,
72
+ allowNull: false,
73
+ defaultValue: DataTypes.UUIDV4,
74
+ primaryKey: true
75
+ },
76
+ radioShowId: {
77
+ type: DataTypes.UUID,
78
+ allowNull: false,
79
+ references: {
80
+ model: 'radio_show',
81
+ key: 'id'
82
+ },
83
+ field: 'radio_show_id'
84
+ },
85
+ originalMediaType: {
86
+ type: DataTypes.INTEGER,
87
+ allowNull: true,
88
+ field: 'original_media_type'
89
+ },
90
+ s3VideoUrl: {
91
+ type: DataTypes.TEXT,
92
+ allowNull: true,
93
+ field: 's3_video_url'
94
+ },
95
+ s3AudioUrl: {
96
+ type: DataTypes.TEXT,
97
+ allowNull: false,
98
+ field: 's3_audio_url'
99
+ },
100
+ createDate: {
101
+ type: DataTypes.DATE,
102
+ allowNull: false,
103
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
104
+ field: 'create_date'
105
+ },
106
+ description: {
107
+ type: DataTypes.TEXT,
108
+ allowNull: true
109
+ },
110
+ cropInstructions: {
111
+ type: DataTypes.TEXT,
112
+ allowNull: true,
113
+ field: 'crop_instructions'
114
+ },
115
+ deleted: {
116
+ type: DataTypes.BOOLEAN,
117
+ allowNull: true
118
+ },
119
+ sourceS3Key: {
120
+ type: DataTypes.TEXT,
121
+ allowNull: true,
122
+ field: 'source_s3_key'
123
+ },
124
+ isAppRecorded: {
125
+ type: DataTypes.BOOLEAN,
126
+ allowNull: true,
127
+ field: 'is_app_recorded'
128
+ },
129
+ automatedModerationApproved: {
130
+ type: DataTypes.BOOLEAN,
131
+ allowNull: true,
132
+ field: 'automated_moderation_approved'
133
+ },
134
+ automatedModerationRejectionMetadata: {
135
+ type: DataTypes.JSONB,
136
+ allowNull: true,
137
+ field: 'automated_moderation_rejection_metadata'
138
+ },
139
+ automatedModerationDecidedAt: {
140
+ type: DataTypes.DATE,
141
+ allowNull: true,
142
+ field: 'automated_moderation_decided_at'
143
+ },
144
+ manualModerationApproved: {
145
+ type: DataTypes.BOOLEAN,
146
+ allowNull: true,
147
+ field: 'manual_moderation_approved'
148
+ },
149
+ manualModerationDecidedAt: {
150
+ type: DataTypes.DATE,
151
+ allowNull: true,
152
+ field: 'manual_moderation_decided_at'
153
+ },
154
+ manualModerationBy: {
155
+ type: DataTypes.TEXT,
156
+ allowNull: true,
157
+ field: 'manual_moderation_by'
158
+ }
159
+ }, {
160
+ sequelize,
161
+ tableName: 'radio_show_media',
162
+ schema: 'eb',
163
+ timestamps: false,
164
+ indexes: [
165
+ {
166
+ name: "idx_radio_show_media_show",
167
+ fields: [
168
+ { name: "radio_show_id" },
169
+ ]
170
+ },
171
+ {
172
+ name: "radio_show_media_pkey",
173
+ unique: true,
174
+ fields: [
175
+ { name: "id" },
176
+ ]
177
+ },
178
+ ]
179
+ });
180
+ }
181
+ }
@@ -0,0 +1,115 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonTrack, CanonTrackId } from './CanonTrack';
4
+ import type { RadioShow, RadioShowId } from './RadioShow';
5
+
6
+ export interface RadioShowPlacementAttributes {
7
+ id: string;
8
+ radioShowId: string;
9
+ canonTrackId?: string;
10
+ radioShowMediaId?: string;
11
+ seqNum: number;
12
+ startTime?: string;
13
+ endTime?: string;
14
+ deleted?: boolean;
15
+ }
16
+
17
+ export type RadioShowPlacementPk = "id";
18
+ export type RadioShowPlacementId = RadioShowPlacement[RadioShowPlacementPk];
19
+ export type RadioShowPlacementOptionalAttributes = "id" | "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "deleted";
20
+ export type RadioShowPlacementCreationAttributes = Optional<RadioShowPlacementAttributes, RadioShowPlacementOptionalAttributes>;
21
+
22
+ export class RadioShowPlacement extends Model<RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes> implements RadioShowPlacementAttributes {
23
+ id!: string;
24
+ radioShowId!: string;
25
+ canonTrackId?: string;
26
+ radioShowMediaId?: string;
27
+ seqNum!: number;
28
+ startTime?: string;
29
+ endTime?: string;
30
+ deleted?: boolean;
31
+
32
+ // RadioShowPlacement belongsTo CanonTrack via canonTrackId
33
+ canonTrack!: CanonTrack;
34
+ getCanonTrack!: Sequelize.BelongsToGetAssociationMixin<CanonTrack>;
35
+ setCanonTrack!: Sequelize.BelongsToSetAssociationMixin<CanonTrack, CanonTrackId>;
36
+ createCanonTrack!: Sequelize.BelongsToCreateAssociationMixin<CanonTrack>;
37
+ // RadioShowPlacement belongsTo RadioShow via radioShowId
38
+ radioShow!: RadioShow;
39
+ getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
40
+ setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
41
+ createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
42
+
43
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPlacement {
44
+ return RadioShowPlacement.init({
45
+ id: {
46
+ type: DataTypes.UUID,
47
+ allowNull: false,
48
+ defaultValue: DataTypes.UUIDV4,
49
+ primaryKey: true
50
+ },
51
+ radioShowId: {
52
+ type: DataTypes.UUID,
53
+ allowNull: false,
54
+ references: {
55
+ model: 'radio_show',
56
+ key: 'id'
57
+ },
58
+ field: 'radio_show_id'
59
+ },
60
+ canonTrackId: {
61
+ type: DataTypes.UUID,
62
+ allowNull: true,
63
+ references: {
64
+ model: 'canon_track',
65
+ key: 'id'
66
+ },
67
+ field: 'canon_track_id'
68
+ },
69
+ radioShowMediaId: {
70
+ type: DataTypes.UUID,
71
+ allowNull: true,
72
+ field: 'radio_show_media_id'
73
+ },
74
+ seqNum: {
75
+ type: DataTypes.INTEGER,
76
+ allowNull: false,
77
+ field: 'seq_num'
78
+ },
79
+ startTime: {
80
+ type: DataTypes.TIME,
81
+ allowNull: true,
82
+ field: 'start_time'
83
+ },
84
+ endTime: {
85
+ type: DataTypes.TIME,
86
+ allowNull: true,
87
+ field: 'end_time'
88
+ },
89
+ deleted: {
90
+ type: DataTypes.BOOLEAN,
91
+ allowNull: true
92
+ }
93
+ }, {
94
+ sequelize,
95
+ tableName: 'radio_show_placement',
96
+ schema: 'eb',
97
+ timestamps: false,
98
+ indexes: [
99
+ {
100
+ name: "idx_radio_show_placement_show",
101
+ fields: [
102
+ { name: "radio_show_id" },
103
+ ]
104
+ },
105
+ {
106
+ name: "radio_show_placement_pkey",
107
+ unique: true,
108
+ fields: [
109
+ { name: "id" },
110
+ ]
111
+ },
112
+ ]
113
+ });
114
+ }
115
+ }
@@ -0,0 +1,86 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { RadioShow, RadioShowId } from './RadioShow';
4
+
5
+ export interface RadioShowPublishRequestsAttributes {
6
+ id: string;
7
+ radioShowId: string;
8
+ approved?: boolean;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type RadioShowPublishRequestsPk = "id";
14
+ export type RadioShowPublishRequestsId = RadioShowPublishRequests[RadioShowPublishRequestsPk];
15
+ export type RadioShowPublishRequestsOptionalAttributes = "id" | "approved" | "createDate" | "updateDate";
16
+ export type RadioShowPublishRequestsCreationAttributes = Optional<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsOptionalAttributes>;
17
+
18
+ export class RadioShowPublishRequests extends Model<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsCreationAttributes> implements RadioShowPublishRequestsAttributes {
19
+ id!: string;
20
+ radioShowId!: string;
21
+ approved?: boolean;
22
+ createDate!: Date;
23
+ updateDate!: Date;
24
+
25
+ // RadioShowPublishRequests belongsTo RadioShow via radioShowId
26
+ radioShow!: RadioShow;
27
+ getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
28
+ setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
29
+ createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPublishRequests {
32
+ return RadioShowPublishRequests.init({
33
+ id: {
34
+ type: DataTypes.UUID,
35
+ allowNull: false,
36
+ defaultValue: DataTypes.UUIDV4,
37
+ primaryKey: true
38
+ },
39
+ radioShowId: {
40
+ type: DataTypes.UUID,
41
+ allowNull: false,
42
+ references: {
43
+ model: 'radio_show',
44
+ key: 'id'
45
+ },
46
+ field: 'radio_show_id'
47
+ },
48
+ approved: {
49
+ type: DataTypes.BOOLEAN,
50
+ allowNull: true
51
+ },
52
+ createDate: {
53
+ type: DataTypes.DATE,
54
+ allowNull: false,
55
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
56
+ field: 'create_date'
57
+ },
58
+ updateDate: {
59
+ type: DataTypes.DATE,
60
+ allowNull: false,
61
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
62
+ field: 'update_date'
63
+ }
64
+ }, {
65
+ sequelize,
66
+ tableName: 'radio_show_publish_requests',
67
+ schema: 'eb',
68
+ timestamps: false,
69
+ indexes: [
70
+ {
71
+ name: "idx_radio_show_publish_show",
72
+ fields: [
73
+ { name: "radio_show_id" },
74
+ ]
75
+ },
76
+ {
77
+ name: "radio_show_publish_requests_pkey",
78
+ unique: true,
79
+ fields: [
80
+ { name: "id" },
81
+ ]
82
+ },
83
+ ]
84
+ });
85
+ }
86
+ }
@@ -0,0 +1,86 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
+ import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
+
7
+ export interface StateAttributes {
8
+ id: number;
9
+ description: string;
10
+ }
11
+
12
+ export type StatePk = "id";
13
+ export type StateId = State[StatePk];
14
+ export type StateCreationAttributes = StateAttributes;
15
+
16
+ export class State extends Model<StateAttributes, StateCreationAttributes> implements StateAttributes {
17
+ id!: number;
18
+ description!: string;
19
+
20
+ // State hasMany AppUser via stateId
21
+ appUsers!: AppUser[];
22
+ getAppUsers!: Sequelize.HasManyGetAssociationsMixin<AppUser>;
23
+ setAppUsers!: Sequelize.HasManySetAssociationsMixin<AppUser, AppUserId>;
24
+ addAppUser!: Sequelize.HasManyAddAssociationMixin<AppUser, AppUserId>;
25
+ addAppUsers!: Sequelize.HasManyAddAssociationsMixin<AppUser, AppUserId>;
26
+ createAppUser!: Sequelize.HasManyCreateAssociationMixin<AppUser>;
27
+ removeAppUser!: Sequelize.HasManyRemoveAssociationMixin<AppUser, AppUserId>;
28
+ removeAppUsers!: Sequelize.HasManyRemoveAssociationsMixin<AppUser, AppUserId>;
29
+ hasAppUser!: Sequelize.HasManyHasAssociationMixin<AppUser, AppUserId>;
30
+ hasAppUsers!: Sequelize.HasManyHasAssociationsMixin<AppUser, AppUserId>;
31
+ countAppUsers!: Sequelize.HasManyCountAssociationsMixin;
32
+ // State hasMany PlatformUserPlaylist via stateId
33
+ platformUserPlaylists!: PlatformUserPlaylist[];
34
+ getPlatformUserPlaylists!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylist>;
35
+ setPlatformUserPlaylists!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
36
+ addPlatformUserPlaylist!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
37
+ addPlatformUserPlaylists!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
38
+ createPlatformUserPlaylist!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylist>;
39
+ removePlatformUserPlaylist!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
40
+ removePlatformUserPlaylists!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
41
+ hasPlatformUserPlaylist!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
42
+ hasPlatformUserPlaylists!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
43
+ countPlatformUserPlaylists!: Sequelize.HasManyCountAssociationsMixin;
44
+ // State hasMany PlatformUserPlaylistTrack via stateId
45
+ platformUserPlaylistTracks!: PlatformUserPlaylistTrack[];
46
+ getPlatformUserPlaylistTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
47
+ setPlatformUserPlaylistTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
48
+ addPlatformUserPlaylistTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
49
+ addPlatformUserPlaylistTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
50
+ createPlatformUserPlaylistTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistTrack>;
51
+ removePlatformUserPlaylistTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
52
+ removePlatformUserPlaylistTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
53
+ hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
54
+ hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
55
+ countPlatformUserPlaylistTracks!: Sequelize.HasManyCountAssociationsMixin;
56
+
57
+ static initModel(sequelize: Sequelize.Sequelize): typeof State {
58
+ return State.init({
59
+ id: {
60
+ autoIncrement: true,
61
+ autoIncrementIdentity: true,
62
+ type: DataTypes.SMALLINT,
63
+ allowNull: false,
64
+ primaryKey: true
65
+ },
66
+ description: {
67
+ type: DataTypes.TEXT,
68
+ allowNull: false
69
+ }
70
+ }, {
71
+ sequelize,
72
+ tableName: 'state',
73
+ schema: 'eb',
74
+ timestamps: false,
75
+ indexes: [
76
+ {
77
+ name: "state_pkey",
78
+ unique: true,
79
+ fields: [
80
+ { name: "id" },
81
+ ]
82
+ },
83
+ ]
84
+ });
85
+ }
86
+ }
@@ -0,0 +1,58 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
4
+
5
+ export interface TrackDeletionReasonAttributes {
6
+ id: number;
7
+ description: string;
8
+ }
9
+
10
+ export type TrackDeletionReasonPk = "id";
11
+ export type TrackDeletionReasonId = TrackDeletionReason[TrackDeletionReasonPk];
12
+ export type TrackDeletionReasonCreationAttributes = TrackDeletionReasonAttributes;
13
+
14
+ export class TrackDeletionReason extends Model<TrackDeletionReasonAttributes, TrackDeletionReasonCreationAttributes> implements TrackDeletionReasonAttributes {
15
+ id!: number;
16
+ description!: string;
17
+
18
+ // TrackDeletionReason hasMany JukeboxQueueEntry via trackDeletionReasonId
19
+ jukeboxQueueEntries!: JukeboxQueueEntry[];
20
+ getJukeboxQueueEntries!: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
21
+ setJukeboxQueueEntries!: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
22
+ addJukeboxQueueEntry!: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
23
+ addJukeboxQueueEntries!: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
24
+ createJukeboxQueueEntry!: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
25
+ removeJukeboxQueueEntry!: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
26
+ removeJukeboxQueueEntries!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
27
+ hasJukeboxQueueEntry!: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
28
+ hasJukeboxQueueEntries!: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
29
+ countJukeboxQueueEntries!: Sequelize.HasManyCountAssociationsMixin;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof TrackDeletionReason {
32
+ return TrackDeletionReason.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: 'track_deletion_reason',
45
+ schema: 'eb',
46
+ timestamps: false,
47
+ indexes: [
48
+ {
49
+ name: "track_deletion_reason_pkey",
50
+ unique: true,
51
+ fields: [
52
+ { name: "id" },
53
+ ]
54
+ },
55
+ ]
56
+ });
57
+ }
58
+ }
@@ -0,0 +1,66 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
+
5
+ export interface UnmatchedAlbumAttributes {
6
+ id: string;
7
+ platformAlbumId: string;
8
+ createDate: Date;
9
+ }
10
+
11
+ export type UnmatchedAlbumPk = "id";
12
+ export type UnmatchedAlbumId = UnmatchedAlbum[UnmatchedAlbumPk];
13
+ export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
14
+ export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
15
+
16
+ export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
17
+ id!: string;
18
+ platformAlbumId!: string;
19
+ createDate!: Date;
20
+
21
+ // UnmatchedAlbum belongsTo PlatformAlbum via platformAlbumId
22
+ platformAlbum!: PlatformAlbum;
23
+ getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
24
+ setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
25
+ createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
26
+
27
+ static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedAlbum {
28
+ return UnmatchedAlbum.init({
29
+ id: {
30
+ type: DataTypes.UUID,
31
+ allowNull: false,
32
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
33
+ primaryKey: true
34
+ },
35
+ platformAlbumId: {
36
+ type: DataTypes.UUID,
37
+ allowNull: false,
38
+ references: {
39
+ model: 'platform_album',
40
+ key: 'id'
41
+ },
42
+ field: 'platform_album_id'
43
+ },
44
+ createDate: {
45
+ type: DataTypes.DATE,
46
+ allowNull: false,
47
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
48
+ field: 'create_date'
49
+ }
50
+ }, {
51
+ sequelize,
52
+ tableName: 'unmatched_album',
53
+ schema: 'eb',
54
+ timestamps: false,
55
+ indexes: [
56
+ {
57
+ name: "unmatched_album_pkey",
58
+ unique: true,
59
+ fields: [
60
+ { name: "id" },
61
+ ]
62
+ },
63
+ ]
64
+ });
65
+ }
66
+ }