@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,136 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AffinityTier, AffinityTierId } from './AffinityTier';
4
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
5
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
6
+
7
+ export interface PlatformUserPlaylistGenreAffinityAttributes {
8
+ id: string;
9
+ platformUserPlaylistId: string;
10
+ canonGenreId: string;
11
+ affinityTierId: number;
12
+ rank: number;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ }
16
+
17
+ export type PlatformUserPlaylistGenreAffinityPk = "id";
18
+ export type PlatformUserPlaylistGenreAffinityId = PlatformUserPlaylistGenreAffinity[PlatformUserPlaylistGenreAffinityPk];
19
+ export type PlatformUserPlaylistGenreAffinityOptionalAttributes = "id" | "createdAt" | "updatedAt";
20
+ export type PlatformUserPlaylistGenreAffinityCreationAttributes = Optional<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityOptionalAttributes>;
21
+
22
+ export class PlatformUserPlaylistGenreAffinity extends Model<PlatformUserPlaylistGenreAffinityAttributes, PlatformUserPlaylistGenreAffinityCreationAttributes> implements PlatformUserPlaylistGenreAffinityAttributes {
23
+ id!: string;
24
+ platformUserPlaylistId!: string;
25
+ canonGenreId!: string;
26
+ affinityTierId!: number;
27
+ rank!: number;
28
+ createdAt!: Date;
29
+ updatedAt!: Date;
30
+
31
+ // PlatformUserPlaylistGenreAffinity belongsTo AffinityTier via affinityTierId
32
+ affinityTier!: AffinityTier;
33
+ getAffinityTier!: Sequelize.BelongsToGetAssociationMixin<AffinityTier>;
34
+ setAffinityTier!: Sequelize.BelongsToSetAssociationMixin<AffinityTier, AffinityTierId>;
35
+ createAffinityTier!: Sequelize.BelongsToCreateAssociationMixin<AffinityTier>;
36
+ // PlatformUserPlaylistGenreAffinity belongsTo CanonGenre via canonGenreId
37
+ canonGenre!: CanonGenre;
38
+ getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
39
+ setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
40
+ createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
41
+ // PlatformUserPlaylistGenreAffinity belongsTo PlatformUserPlaylist via platformUserPlaylistId
42
+ platformUserPlaylist!: PlatformUserPlaylist;
43
+ getPlatformUserPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
44
+ setPlatformUserPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
45
+ createPlatformUserPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
46
+
47
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistGenreAffinity {
48
+ return PlatformUserPlaylistGenreAffinity.init({
49
+ id: {
50
+ type: DataTypes.UUID,
51
+ allowNull: false,
52
+ defaultValue: DataTypes.UUIDV4,
53
+ primaryKey: true
54
+ },
55
+ platformUserPlaylistId: {
56
+ type: DataTypes.UUID,
57
+ allowNull: false,
58
+ references: {
59
+ model: 'platform_user_playlist',
60
+ key: 'id'
61
+ },
62
+ unique: "unique_pupga_canon_genre",
63
+ field: 'platform_user_playlist_id'
64
+ },
65
+ canonGenreId: {
66
+ type: DataTypes.UUID,
67
+ allowNull: false,
68
+ references: {
69
+ model: 'canon_genre',
70
+ key: 'id'
71
+ },
72
+ unique: "unique_pupga_canon_genre",
73
+ field: 'canon_genre_id'
74
+ },
75
+ affinityTierId: {
76
+ type: DataTypes.SMALLINT,
77
+ allowNull: false,
78
+ references: {
79
+ model: 'affinity_tier',
80
+ key: 'id'
81
+ },
82
+ field: 'affinity_tier_id'
83
+ },
84
+ rank: {
85
+ type: DataTypes.INTEGER,
86
+ allowNull: false
87
+ },
88
+ createdAt: {
89
+ type: DataTypes.DATE,
90
+ allowNull: false,
91
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
92
+ field: 'created_at'
93
+ },
94
+ updatedAt: {
95
+ type: DataTypes.DATE,
96
+ allowNull: false,
97
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
98
+ field: 'updated_at'
99
+ }
100
+ }, {
101
+ sequelize,
102
+ tableName: 'platform_user_playlist_genre_affinity',
103
+ schema: 'eb',
104
+ timestamps: false,
105
+ indexes: [
106
+ {
107
+ name: "idx_platform_user_playlist_genre_affinity",
108
+ fields: [
109
+ { name: "platform_user_playlist_id" },
110
+ ]
111
+ },
112
+ {
113
+ name: "idx_platform_user_playlist_genre_affinity_genre",
114
+ fields: [
115
+ { name: "canon_genre_id" },
116
+ ]
117
+ },
118
+ {
119
+ name: "platform_user_playlist_genre_affinity_pkey",
120
+ unique: true,
121
+ fields: [
122
+ { name: "id" },
123
+ ]
124
+ },
125
+ {
126
+ name: "unique_pupga_canon_genre",
127
+ unique: true,
128
+ fields: [
129
+ { name: "platform_user_playlist_id" },
130
+ { name: "canon_genre_id" },
131
+ ]
132
+ },
133
+ ]
134
+ });
135
+ }
136
+ }
@@ -0,0 +1,162 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
4
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
+ import type { State, StateId } from './State';
6
+
7
+ export interface PlatformUserPlaylistTrackAttributes {
8
+ id: string;
9
+ platformTrackId: string;
10
+ platformUserPlaylistId: string;
11
+ trackPosition: number;
12
+ addedDate?: Date;
13
+ addedByPlatformUserId?: string;
14
+ isLocal: boolean;
15
+ createDate: Date;
16
+ updateDate: Date;
17
+ stateId: number;
18
+ externalPlaylistTrackId: string;
19
+ }
20
+
21
+ export type PlatformUserPlaylistTrackPk = "id";
22
+ export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
23
+ export type PlatformUserPlaylistTrackOptionalAttributes = "id" | "trackPosition" | "addedDate" | "addedByPlatformUserId" | "createDate" | "updateDate" | "stateId";
24
+ export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
25
+
26
+ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
27
+ id!: string;
28
+ platformTrackId!: string;
29
+ platformUserPlaylistId!: string;
30
+ trackPosition!: number;
31
+ addedDate?: Date;
32
+ addedByPlatformUserId?: string;
33
+ isLocal!: boolean;
34
+ createDate!: Date;
35
+ updateDate!: Date;
36
+ stateId!: number;
37
+ externalPlaylistTrackId!: string;
38
+
39
+ // PlatformUserPlaylistTrack belongsTo PlatformTrack via platformTrackId
40
+ platformTrack!: PlatformTrack;
41
+ getPlatformTrack!: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
42
+ setPlatformTrack!: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
43
+ createPlatformTrack!: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
44
+ // PlatformUserPlaylistTrack belongsTo PlatformUserPlaylist via platformUserPlaylistId
45
+ platformUserPlaylist!: PlatformUserPlaylist;
46
+ getPlatformUserPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
47
+ setPlatformUserPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
48
+ createPlatformUserPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
49
+ // PlatformUserPlaylistTrack belongsTo State via stateId
50
+ state!: State;
51
+ getState!: Sequelize.BelongsToGetAssociationMixin<State>;
52
+ setState!: Sequelize.BelongsToSetAssociationMixin<State, StateId>;
53
+ createState!: Sequelize.BelongsToCreateAssociationMixin<State>;
54
+
55
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistTrack {
56
+ return PlatformUserPlaylistTrack.init({
57
+ id: {
58
+ type: DataTypes.UUID,
59
+ allowNull: false,
60
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
61
+ primaryKey: true
62
+ },
63
+ platformTrackId: {
64
+ type: DataTypes.UUID,
65
+ allowNull: false,
66
+ references: {
67
+ model: 'platform_track',
68
+ key: 'id'
69
+ },
70
+ unique: "uk_playlist_id_track_id",
71
+ field: 'platform_track_id'
72
+ },
73
+ platformUserPlaylistId: {
74
+ type: DataTypes.UUID,
75
+ allowNull: false,
76
+ references: {
77
+ model: 'platform_user_playlist',
78
+ key: 'id'
79
+ },
80
+ unique: "uk_playlist_id_track_id",
81
+ field: 'platform_user_playlist_id'
82
+ },
83
+ trackPosition: {
84
+ type: DataTypes.INTEGER,
85
+ allowNull: false,
86
+ defaultValue: 0,
87
+ field: 'track_position'
88
+ },
89
+ addedDate: {
90
+ type: DataTypes.DATE,
91
+ allowNull: true,
92
+ field: 'added_date'
93
+ },
94
+ addedByPlatformUserId: {
95
+ type: DataTypes.TEXT,
96
+ allowNull: true,
97
+ field: 'added_by_platform_user_id'
98
+ },
99
+ isLocal: {
100
+ type: DataTypes.BOOLEAN,
101
+ allowNull: false,
102
+ defaultValue: false,
103
+ field: 'is_local'
104
+ },
105
+ createDate: {
106
+ type: DataTypes.DATE,
107
+ allowNull: false,
108
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
109
+ field: 'create_date'
110
+ },
111
+ updateDate: {
112
+ type: DataTypes.DATE,
113
+ allowNull: false,
114
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
115
+ field: 'update_date'
116
+ },
117
+ stateId: {
118
+ type: DataTypes.SMALLINT,
119
+ allowNull: false,
120
+ defaultValue: 0,
121
+ references: {
122
+ model: 'state',
123
+ key: 'id'
124
+ },
125
+ field: 'state_id'
126
+ },
127
+ externalPlaylistTrackId: {
128
+ type: DataTypes.STRING(255),
129
+ allowNull: false,
130
+ field: 'external_playlist_track_id'
131
+ }
132
+ }, {
133
+ sequelize,
134
+ tableName: 'platform_user_playlist_track',
135
+ schema: 'eb',
136
+ timestamps: false,
137
+ indexes: [
138
+ {
139
+ name: "idx_playlist_track_playlist",
140
+ fields: [
141
+ { name: "platform_user_playlist_id" },
142
+ ]
143
+ },
144
+ {
145
+ name: "playlist_track_pkey",
146
+ unique: true,
147
+ fields: [
148
+ { name: "id" },
149
+ ]
150
+ },
151
+ {
152
+ name: "uk_playlist_id_track_id",
153
+ unique: true,
154
+ fields: [
155
+ { name: "platform_track_id" },
156
+ { name: "platform_user_playlist_id" },
157
+ ]
158
+ },
159
+ ]
160
+ });
161
+ }
162
+ }
@@ -0,0 +1,47 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+
4
+ export interface PlaybackStatusAttributes {
5
+ id: number;
6
+ description: string;
7
+ }
8
+
9
+ export type PlaybackStatusPk = "id";
10
+ export type PlaybackStatusId = PlaybackStatus[PlaybackStatusPk];
11
+ export type PlaybackStatusCreationAttributes = PlaybackStatusAttributes;
12
+
13
+ export class PlaybackStatus extends Model<PlaybackStatusAttributes, PlaybackStatusCreationAttributes> implements PlaybackStatusAttributes {
14
+ id!: number;
15
+ description!: string;
16
+
17
+
18
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatus {
19
+ return PlaybackStatus.init({
20
+ id: {
21
+ autoIncrement: true,
22
+ autoIncrementIdentity: true,
23
+ type: DataTypes.SMALLINT,
24
+ allowNull: false,
25
+ primaryKey: true
26
+ },
27
+ description: {
28
+ type: DataTypes.TEXT,
29
+ allowNull: false
30
+ }
31
+ }, {
32
+ sequelize,
33
+ tableName: 'playback_status',
34
+ schema: 'eb',
35
+ timestamps: false,
36
+ indexes: [
37
+ {
38
+ name: "playback_status_pkey",
39
+ unique: true,
40
+ fields: [
41
+ { name: "id" },
42
+ ]
43
+ },
44
+ ]
45
+ });
46
+ }
47
+ }
@@ -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 PlaybackStatusTypeAttributes {
6
+ id: number;
7
+ description: string;
8
+ }
9
+
10
+ export type PlaybackStatusTypePk = "id";
11
+ export type PlaybackStatusTypeId = PlaybackStatusType[PlaybackStatusTypePk];
12
+ export type PlaybackStatusTypeCreationAttributes = PlaybackStatusTypeAttributes;
13
+
14
+ export class PlaybackStatusType extends Model<PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes> implements PlaybackStatusTypeAttributes {
15
+ id!: number;
16
+ description!: string;
17
+
18
+ // PlaybackStatusType hasMany JukeboxQueueEntry via playbackStatusTypeId
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 PlaybackStatusType {
32
+ return PlaybackStatusType.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: 'playback_status_type',
45
+ schema: 'eb',
46
+ timestamps: false,
47
+ indexes: [
48
+ {
49
+ name: "playback_status_type_pkey",
50
+ unique: true,
51
+ fields: [
52
+ { name: "id" },
53
+ ]
54
+ },
55
+ ]
56
+ });
57
+ }
58
+ }
@@ -0,0 +1,209 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
5
+ import type { RadioShowMedia, RadioShowMediaId } from './RadioShowMedia';
6
+ import type { RadioShowPlacement, RadioShowPlacementId } from './RadioShowPlacement';
7
+ import type { RadioShowPublishRequests, RadioShowPublishRequestsId } from './RadioShowPublishRequests';
8
+ import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
9
+ import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
10
+ import type { UserComments, UserCommentsId } from './UserComments';
11
+ import type { UserLikes, UserLikesId } from './UserLikes';
12
+
13
+ export interface RadioShowAttributes {
14
+ id: string;
15
+ creatorUserId: string;
16
+ scheduledRelease?: Date;
17
+ title: string;
18
+ description?: string;
19
+ deleted?: boolean;
20
+ createDate: Date;
21
+ updateDate: Date;
22
+ }
23
+
24
+ export type RadioShowPk = "id";
25
+ export type RadioShowId = RadioShow[RadioShowPk];
26
+ export type RadioShowOptionalAttributes = "id" | "scheduledRelease" | "description" | "deleted" | "createDate" | "updateDate";
27
+ export type RadioShowCreationAttributes = Optional<RadioShowAttributes, RadioShowOptionalAttributes>;
28
+
29
+ export class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttributes> implements RadioShowAttributes {
30
+ id!: string;
31
+ creatorUserId!: string;
32
+ scheduledRelease?: Date;
33
+ title!: string;
34
+ description?: string;
35
+ deleted?: boolean;
36
+ createDate!: Date;
37
+ updateDate!: Date;
38
+
39
+ // RadioShow belongsTo AppUser via creatorUserId
40
+ creatorUser!: AppUser;
41
+ getCreatorUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
42
+ setCreatorUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
43
+ createCreatorUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
44
+ // RadioShow hasMany RadioShowGenres via radioShowId
45
+ radioShowGenres!: RadioShowGenres[];
46
+ getRadioShowGenres!: Sequelize.HasManyGetAssociationsMixin<RadioShowGenres>;
47
+ setRadioShowGenres!: Sequelize.HasManySetAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
48
+ addRadioShowGenre!: Sequelize.HasManyAddAssociationMixin<RadioShowGenres, RadioShowGenresId>;
49
+ addRadioShowGenres!: Sequelize.HasManyAddAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
50
+ createRadioShowGenre!: Sequelize.HasManyCreateAssociationMixin<RadioShowGenres>;
51
+ removeRadioShowGenre!: Sequelize.HasManyRemoveAssociationMixin<RadioShowGenres, RadioShowGenresId>;
52
+ removeRadioShowGenres!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
53
+ hasRadioShowGenre!: Sequelize.HasManyHasAssociationMixin<RadioShowGenres, RadioShowGenresId>;
54
+ hasRadioShowGenres!: Sequelize.HasManyHasAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
55
+ countRadioShowGenres!: Sequelize.HasManyCountAssociationsMixin;
56
+ // RadioShow hasMany RadioShowMedia via radioShowId
57
+ radioShowMedia!: RadioShowMedia[];
58
+ getRadioShowMedia!: Sequelize.HasManyGetAssociationsMixin<RadioShowMedia>;
59
+ setRadioShowMedia!: Sequelize.HasManySetAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
60
+ addRadioShowMedium!: Sequelize.HasManyAddAssociationMixin<RadioShowMedia, RadioShowMediaId>;
61
+ addRadioShowMedia!: Sequelize.HasManyAddAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
62
+ createRadioShowMedium!: Sequelize.HasManyCreateAssociationMixin<RadioShowMedia>;
63
+ removeRadioShowMedium!: Sequelize.HasManyRemoveAssociationMixin<RadioShowMedia, RadioShowMediaId>;
64
+ removeRadioShowMedia!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
65
+ hasRadioShowMedium!: Sequelize.HasManyHasAssociationMixin<RadioShowMedia, RadioShowMediaId>;
66
+ hasRadioShowMedia!: Sequelize.HasManyHasAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
67
+ countRadioShowMedia!: Sequelize.HasManyCountAssociationsMixin;
68
+ // RadioShow hasMany RadioShowPlacement via radioShowId
69
+ radioShowPlacements!: RadioShowPlacement[];
70
+ getRadioShowPlacements!: Sequelize.HasManyGetAssociationsMixin<RadioShowPlacement>;
71
+ setRadioShowPlacements!: Sequelize.HasManySetAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
72
+ addRadioShowPlacement!: Sequelize.HasManyAddAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
73
+ addRadioShowPlacements!: Sequelize.HasManyAddAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
74
+ createRadioShowPlacement!: Sequelize.HasManyCreateAssociationMixin<RadioShowPlacement>;
75
+ removeRadioShowPlacement!: Sequelize.HasManyRemoveAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
76
+ removeRadioShowPlacements!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
77
+ hasRadioShowPlacement!: Sequelize.HasManyHasAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
78
+ hasRadioShowPlacements!: Sequelize.HasManyHasAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
79
+ countRadioShowPlacements!: Sequelize.HasManyCountAssociationsMixin;
80
+ // RadioShow hasMany RadioShowPublishRequests via radioShowId
81
+ radioShowPublishRequests!: RadioShowPublishRequests[];
82
+ getRadioShowPublishRequests!: Sequelize.HasManyGetAssociationsMixin<RadioShowPublishRequests>;
83
+ setRadioShowPublishRequests!: Sequelize.HasManySetAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
84
+ addRadioShowPublishRequest!: Sequelize.HasManyAddAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
85
+ addRadioShowPublishRequests!: Sequelize.HasManyAddAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
86
+ createRadioShowPublishRequest!: Sequelize.HasManyCreateAssociationMixin<RadioShowPublishRequests>;
87
+ removeRadioShowPublishRequest!: Sequelize.HasManyRemoveAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
88
+ removeRadioShowPublishRequests!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
89
+ hasRadioShowPublishRequest!: Sequelize.HasManyHasAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
90
+ hasRadioShowPublishRequests!: Sequelize.HasManyHasAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
91
+ countRadioShowPublishRequests!: Sequelize.HasManyCountAssociationsMixin;
92
+ // RadioShow hasMany UserAbuseReports via radioShowId
93
+ userAbuseReports!: UserAbuseReports[];
94
+ getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
95
+ setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
96
+ addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
97
+ addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
98
+ createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
99
+ removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
100
+ removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
101
+ hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
102
+ hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
103
+ countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
104
+ // RadioShow hasMany UserBookmarks via radioShowId
105
+ userBookmarks!: UserBookmarks[];
106
+ getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
107
+ setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
108
+ addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
109
+ addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
110
+ createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
111
+ removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
112
+ removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
113
+ hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
114
+ hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
115
+ countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
116
+ // RadioShow hasMany UserComments via radioShowId
117
+ userComments!: UserComments[];
118
+ getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
119
+ setUserComments!: Sequelize.HasManySetAssociationsMixin<UserComments, UserCommentsId>;
120
+ addUserComment!: Sequelize.HasManyAddAssociationMixin<UserComments, UserCommentsId>;
121
+ addUserComments!: Sequelize.HasManyAddAssociationsMixin<UserComments, UserCommentsId>;
122
+ createUserComment!: Sequelize.HasManyCreateAssociationMixin<UserComments>;
123
+ removeUserComment!: Sequelize.HasManyRemoveAssociationMixin<UserComments, UserCommentsId>;
124
+ removeUserComments!: Sequelize.HasManyRemoveAssociationsMixin<UserComments, UserCommentsId>;
125
+ hasUserComment!: Sequelize.HasManyHasAssociationMixin<UserComments, UserCommentsId>;
126
+ hasUserComments!: Sequelize.HasManyHasAssociationsMixin<UserComments, UserCommentsId>;
127
+ countUserComments!: Sequelize.HasManyCountAssociationsMixin;
128
+ // RadioShow hasMany UserLikes via radioShowId
129
+ userLikes!: UserLikes[];
130
+ getUserLikes!: Sequelize.HasManyGetAssociationsMixin<UserLikes>;
131
+ setUserLikes!: Sequelize.HasManySetAssociationsMixin<UserLikes, UserLikesId>;
132
+ addUserLike!: Sequelize.HasManyAddAssociationMixin<UserLikes, UserLikesId>;
133
+ addUserLikes!: Sequelize.HasManyAddAssociationsMixin<UserLikes, UserLikesId>;
134
+ createUserLike!: Sequelize.HasManyCreateAssociationMixin<UserLikes>;
135
+ removeUserLike!: Sequelize.HasManyRemoveAssociationMixin<UserLikes, UserLikesId>;
136
+ removeUserLikes!: Sequelize.HasManyRemoveAssociationsMixin<UserLikes, UserLikesId>;
137
+ hasUserLike!: Sequelize.HasManyHasAssociationMixin<UserLikes, UserLikesId>;
138
+ hasUserLikes!: Sequelize.HasManyHasAssociationsMixin<UserLikes, UserLikesId>;
139
+ countUserLikes!: Sequelize.HasManyCountAssociationsMixin;
140
+
141
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShow {
142
+ return RadioShow.init({
143
+ id: {
144
+ type: DataTypes.UUID,
145
+ allowNull: false,
146
+ defaultValue: DataTypes.UUIDV4,
147
+ primaryKey: true
148
+ },
149
+ creatorUserId: {
150
+ type: DataTypes.UUID,
151
+ allowNull: false,
152
+ references: {
153
+ model: 'app_user',
154
+ key: 'id'
155
+ },
156
+ field: 'creator_user_id'
157
+ },
158
+ scheduledRelease: {
159
+ type: DataTypes.DATE,
160
+ allowNull: true,
161
+ field: 'scheduled_release'
162
+ },
163
+ title: {
164
+ type: DataTypes.STRING(40),
165
+ allowNull: false
166
+ },
167
+ description: {
168
+ type: DataTypes.STRING(512),
169
+ allowNull: true
170
+ },
171
+ deleted: {
172
+ type: DataTypes.BOOLEAN,
173
+ allowNull: true
174
+ },
175
+ createDate: {
176
+ type: DataTypes.DATE,
177
+ allowNull: false,
178
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
179
+ field: 'create_date'
180
+ },
181
+ updateDate: {
182
+ type: DataTypes.DATE,
183
+ allowNull: false,
184
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
185
+ field: 'update_date'
186
+ }
187
+ }, {
188
+ sequelize,
189
+ tableName: 'radio_show',
190
+ schema: 'eb',
191
+ timestamps: false,
192
+ indexes: [
193
+ {
194
+ name: "idx_radio_show_creator",
195
+ fields: [
196
+ { name: "creator_user_id" },
197
+ ]
198
+ },
199
+ {
200
+ name: "radio_show_pkey",
201
+ unique: true,
202
+ fields: [
203
+ { name: "id" },
204
+ ]
205
+ },
206
+ ]
207
+ });
208
+ }
209
+ }