@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.
- package/.dockerignore +10 -0
- package/.github/workflows/publish.yaml +303 -0
- package/.nvmrc +1 -0
- package/Dockerfile.generate +19 -0
- package/model_options.json +3 -0
- package/models/AccessControlPreference.ts +53 -0
- package/models/AffinityRelationshipType.ts +96 -0
- package/models/AffinityTier.ts +131 -0
- package/models/AppUser.ts +577 -0
- package/models/AppUserDevice.ts +101 -0
- package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
- package/models/AppUserFollowRelation.ts +128 -0
- package/models/AppUserPlatformRelation.ts +150 -0
- package/models/CanonAlbum.ts +229 -0
- package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
- package/models/CanonAlbumGenreRelation.ts +86 -0
- package/models/CanonAlbumLabelRelation.ts +86 -0
- package/models/CanonAlbumTrackRelation.ts +92 -0
- package/models/CanonArtist.ts +356 -0
- package/models/CanonArtistAlbumRelation.ts +92 -0
- package/models/CanonArtistExternalReferenceRelation.ts +92 -0
- package/models/CanonArtistGenreRelation.ts +86 -0
- package/models/CanonArtistMemberRelation.ts +86 -0
- package/models/CanonArtistTrackRelation.ts +92 -0
- package/models/CanonGenre.ts +273 -0
- package/models/CanonGenreExternalReferenceRelation.ts +92 -0
- package/models/CanonLabel.ts +129 -0
- package/models/CanonLabelExternalReferenceRelation.ts +92 -0
- package/models/CanonMember.ts +130 -0
- package/models/CanonMemberExternalReferenceRelation.ts +99 -0
- package/models/CanonToPlatformAlbumRelation.ts +92 -0
- package/models/CanonToPlatformArtistRelation.ts +92 -0
- package/models/CanonToPlatformGenreRelation.ts +86 -0
- package/models/CanonToPlatformTrackRelation.ts +92 -0
- package/models/CanonTrack.ts +232 -0
- package/models/ConfigParam.ts +62 -0
- package/models/ExternalReference.ts +201 -0
- package/models/FeedConfig.ts +65 -0
- package/models/FeedContentType.ts +124 -0
- package/models/GuestUser.ts +137 -0
- package/models/JukeboxAccessType.ts +60 -0
- package/models/JukeboxCanonGenreRelation.ts +108 -0
- package/models/JukeboxInvite.ts +125 -0
- package/models/JukeboxQueueEntry.ts +247 -0
- package/models/JukeboxQueueMode.ts +60 -0
- package/models/JukeboxSession.ts +334 -0
- package/models/JukeboxSessionArtistAffinity.ts +136 -0
- package/models/JukeboxSessionGenreAffinity.ts +136 -0
- package/models/JukeboxStatus.ts +58 -0
- package/models/JukeboxTerminationCondition.ts +60 -0
- package/models/JukeboxType.ts +60 -0
- package/models/JukeboxUser.ts +182 -0
- package/models/JukeboxUserType.ts +58 -0
- package/models/KnexMigrations.ts +60 -0
- package/models/KnexMigrationsLock.ts +48 -0
- package/models/MerchItem.ts +198 -0
- package/models/MerchOrchestration.ts +130 -0
- package/models/MerchPlatform.ts +95 -0
- package/models/MerchType.ts +89 -0
- package/models/MetricsDaily.ts +79 -0
- package/models/MetricsEvent.ts +124 -0
- package/models/NewsArticle.ts +177 -0
- package/models/NewsPlatform.ts +76 -0
- package/models/NewsSite.ts +75 -0
- package/models/Notification.ts +214 -0
- package/models/NotificationType.ts +66 -0
- package/models/PauseStatusType.ts +58 -0
- package/models/Platform.ts +189 -0
- package/models/PlatformAlbum.ts +398 -0
- package/models/PlatformAlbumGenreRelation.ts +86 -0
- package/models/PlatformAlbumTrackRelation.ts +92 -0
- package/models/PlatformArtist.ts +358 -0
- package/models/PlatformArtistAlbumRelation.ts +92 -0
- package/models/PlatformArtistGenreRelation.ts +86 -0
- package/models/PlatformArtistTrackRelation.ts +92 -0
- package/models/PlatformGenre.ts +194 -0
- package/models/PlatformTrack.ts +339 -0
- package/models/PlatformTrackGenreRelation.ts +86 -0
- package/models/PlatformUserAlbum.ts +152 -0
- package/models/PlatformUserAlbumTrack.ts +138 -0
- package/models/PlatformUserPlaylist.ts +260 -0
- package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
- package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
- package/models/PlatformUserPlaylistTrack.ts +162 -0
- package/models/PlaybackStatus.ts +47 -0
- package/models/PlaybackStatusType.ts +58 -0
- package/models/RadioShow.ts +209 -0
- package/models/RadioShowGenres.ts +107 -0
- package/models/RadioShowMedia.ts +181 -0
- package/models/RadioShowPlacement.ts +115 -0
- package/models/RadioShowPublishRequests.ts +86 -0
- package/models/State.ts +86 -0
- package/models/TrackDeletionReason.ts +58 -0
- package/models/UnmatchedAlbum.ts +66 -0
- package/models/UnmatchedArtist.ts +81 -0
- package/models/UserAbuseReports.ts +232 -0
- package/models/UserAffinity.ts +117 -0
- package/models/UserArtistAffinity.ts +136 -0
- package/models/UserBookmarks.ts +235 -0
- package/models/UserComments.ts +271 -0
- package/models/UserContacts.ts +155 -0
- package/models/UserEngagementFactor.ts +109 -0
- package/models/UserGenreAffinity.ts +136 -0
- package/models/UserLikes.ts +235 -0
- package/models/UserMessages.ts +189 -0
- package/models/Versus.ts +438 -0
- package/models/VersusAccessType.ts +66 -0
- package/models/VersusCoCreator.ts +111 -0
- package/models/VersusCreatorScope.ts +66 -0
- package/models/VersusEndMode.ts +66 -0
- package/models/VersusEndTimerDuration.ts +81 -0
- package/models/VersusEndVoteThreshold.ts +67 -0
- package/models/VersusEntityKind.ts +79 -0
- package/models/VersusOption.ts +258 -0
- package/models/VersusPublishIssue.ts +146 -0
- package/models/VersusQuestion.ts +123 -0
- package/models/VersusQuestionVariableType.ts +66 -0
- package/models/VersusVote.ts +99 -0
- package/models/VersusVotingListType.ts +66 -0
- package/models/VersusVotingMode.ts +66 -0
- package/models/index.ts +3 -0
- package/models/init-models.ts +1259 -0
- package/models/initDb.ts +72 -0
- package/models/rdsCaBundle.ts +5 -0
- package/package.json +2 -5
- package/scripts/generate-and-upload.mjs +123 -0
- package/scripts/update-rds-ca-bundle.mjs +44 -0
- package/tsconfig.json +52 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
4
|
+
|
|
5
|
+
export interface JukeboxTerminationConditionAttributes {
|
|
6
|
+
id: number;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type JukeboxTerminationConditionPk = "id";
|
|
11
|
+
export type JukeboxTerminationConditionId = JukeboxTerminationCondition[JukeboxTerminationConditionPk];
|
|
12
|
+
export type JukeboxTerminationConditionCreationAttributes = JukeboxTerminationConditionAttributes;
|
|
13
|
+
|
|
14
|
+
export class JukeboxTerminationCondition extends Model<JukeboxTerminationConditionAttributes, JukeboxTerminationConditionCreationAttributes> implements JukeboxTerminationConditionAttributes {
|
|
15
|
+
id!: number;
|
|
16
|
+
description!: string;
|
|
17
|
+
|
|
18
|
+
// JukeboxTerminationCondition hasMany JukeboxSession via terminationConditionId
|
|
19
|
+
jukeboxSessions!: JukeboxSession[];
|
|
20
|
+
getJukeboxSessions!: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
|
|
21
|
+
setJukeboxSessions!: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
22
|
+
addJukeboxSession!: Sequelize.HasManyAddAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
23
|
+
addJukeboxSessions!: Sequelize.HasManyAddAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
24
|
+
createJukeboxSession!: Sequelize.HasManyCreateAssociationMixin<JukeboxSession>;
|
|
25
|
+
removeJukeboxSession!: Sequelize.HasManyRemoveAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
26
|
+
removeJukeboxSessions!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
27
|
+
hasJukeboxSession!: Sequelize.HasManyHasAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
28
|
+
hasJukeboxSessions!: Sequelize.HasManyHasAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
29
|
+
countJukeboxSessions!: Sequelize.HasManyCountAssociationsMixin;
|
|
30
|
+
|
|
31
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxTerminationCondition {
|
|
32
|
+
return JukeboxTerminationCondition.init({
|
|
33
|
+
id: {
|
|
34
|
+
autoIncrement: true,
|
|
35
|
+
autoIncrementIdentity: true,
|
|
36
|
+
type: DataTypes.SMALLINT,
|
|
37
|
+
allowNull: false,
|
|
38
|
+
primaryKey: true
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: DataTypes.TEXT,
|
|
42
|
+
allowNull: false
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
sequelize,
|
|
46
|
+
tableName: 'jukebox_termination_condition',
|
|
47
|
+
schema: 'eb',
|
|
48
|
+
timestamps: false,
|
|
49
|
+
indexes: [
|
|
50
|
+
{
|
|
51
|
+
name: "jukebox_termination_condition_pkey",
|
|
52
|
+
unique: true,
|
|
53
|
+
fields: [
|
|
54
|
+
{ name: "id" },
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
4
|
+
|
|
5
|
+
export interface JukeboxTypeAttributes {
|
|
6
|
+
id: number;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type JukeboxTypePk = "id";
|
|
11
|
+
export type JukeboxTypeId = JukeboxType[JukeboxTypePk];
|
|
12
|
+
export type JukeboxTypeCreationAttributes = JukeboxTypeAttributes;
|
|
13
|
+
|
|
14
|
+
export class JukeboxType extends Model<JukeboxTypeAttributes, JukeboxTypeCreationAttributes> implements JukeboxTypeAttributes {
|
|
15
|
+
id!: number;
|
|
16
|
+
description!: string;
|
|
17
|
+
|
|
18
|
+
// JukeboxType hasMany JukeboxSession via typeId
|
|
19
|
+
jukeboxSessions!: JukeboxSession[];
|
|
20
|
+
getJukeboxSessions!: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
|
|
21
|
+
setJukeboxSessions!: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
22
|
+
addJukeboxSession!: Sequelize.HasManyAddAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
23
|
+
addJukeboxSessions!: Sequelize.HasManyAddAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
24
|
+
createJukeboxSession!: Sequelize.HasManyCreateAssociationMixin<JukeboxSession>;
|
|
25
|
+
removeJukeboxSession!: Sequelize.HasManyRemoveAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
26
|
+
removeJukeboxSessions!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
27
|
+
hasJukeboxSession!: Sequelize.HasManyHasAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
28
|
+
hasJukeboxSessions!: Sequelize.HasManyHasAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
29
|
+
countJukeboxSessions!: Sequelize.HasManyCountAssociationsMixin;
|
|
30
|
+
|
|
31
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxType {
|
|
32
|
+
return JukeboxType.init({
|
|
33
|
+
id: {
|
|
34
|
+
autoIncrement: true,
|
|
35
|
+
autoIncrementIdentity: true,
|
|
36
|
+
type: DataTypes.SMALLINT,
|
|
37
|
+
allowNull: false,
|
|
38
|
+
primaryKey: true
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: DataTypes.TEXT,
|
|
42
|
+
allowNull: false
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
sequelize,
|
|
46
|
+
tableName: 'jukebox_type',
|
|
47
|
+
schema: 'eb',
|
|
48
|
+
timestamps: false,
|
|
49
|
+
indexes: [
|
|
50
|
+
{
|
|
51
|
+
name: "jukebox_type_pkey",
|
|
52
|
+
unique: true,
|
|
53
|
+
fields: [
|
|
54
|
+
{ name: "id" },
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
5
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
6
|
+
import type { JukeboxUserType, JukeboxUserTypeId } from './JukeboxUserType';
|
|
7
|
+
import type { PauseStatusType, PauseStatusTypeId } from './PauseStatusType';
|
|
8
|
+
|
|
9
|
+
export interface JukeboxUserAttributes {
|
|
10
|
+
id: string;
|
|
11
|
+
jukeboxSessionId: string;
|
|
12
|
+
appUserId: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
enterDate: Date;
|
|
16
|
+
exitDate?: Date;
|
|
17
|
+
jukeboxUserTypeId: number;
|
|
18
|
+
pauseStatusTypeId: number;
|
|
19
|
+
pausedQueueEntryId?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type JukeboxUserPk = "id";
|
|
23
|
+
export type JukeboxUserId = JukeboxUser[JukeboxUserPk];
|
|
24
|
+
export type JukeboxUserOptionalAttributes = "id" | "createdAt" | "updatedAt" | "enterDate" | "exitDate" | "jukeboxUserTypeId" | "pauseStatusTypeId" | "pausedQueueEntryId";
|
|
25
|
+
export type JukeboxUserCreationAttributes = Optional<JukeboxUserAttributes, JukeboxUserOptionalAttributes>;
|
|
26
|
+
|
|
27
|
+
export class JukeboxUser extends Model<JukeboxUserAttributes, JukeboxUserCreationAttributes> implements JukeboxUserAttributes {
|
|
28
|
+
id!: string;
|
|
29
|
+
jukeboxSessionId!: string;
|
|
30
|
+
appUserId!: string;
|
|
31
|
+
createdAt!: Date;
|
|
32
|
+
updatedAt!: Date;
|
|
33
|
+
enterDate!: Date;
|
|
34
|
+
exitDate?: Date;
|
|
35
|
+
jukeboxUserTypeId!: number;
|
|
36
|
+
pauseStatusTypeId!: number;
|
|
37
|
+
pausedQueueEntryId?: string;
|
|
38
|
+
|
|
39
|
+
// JukeboxUser belongsTo AppUser via appUserId
|
|
40
|
+
appUser!: AppUser;
|
|
41
|
+
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
42
|
+
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
43
|
+
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
44
|
+
// JukeboxUser belongsTo JukeboxQueueEntry via pausedQueueEntryId
|
|
45
|
+
pausedQueueEntry!: JukeboxQueueEntry;
|
|
46
|
+
getPausedQueueEntry!: Sequelize.BelongsToGetAssociationMixin<JukeboxQueueEntry>;
|
|
47
|
+
setPausedQueueEntry!: Sequelize.BelongsToSetAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
48
|
+
createPausedQueueEntry!: Sequelize.BelongsToCreateAssociationMixin<JukeboxQueueEntry>;
|
|
49
|
+
// JukeboxUser belongsTo JukeboxSession via jukeboxSessionId
|
|
50
|
+
jukeboxSession!: JukeboxSession;
|
|
51
|
+
getJukeboxSession!: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
52
|
+
setJukeboxSession!: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
53
|
+
createJukeboxSession!: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
54
|
+
// JukeboxUser belongsTo JukeboxUserType via jukeboxUserTypeId
|
|
55
|
+
jukeboxUserType!: JukeboxUserType;
|
|
56
|
+
getJukeboxUserType!: Sequelize.BelongsToGetAssociationMixin<JukeboxUserType>;
|
|
57
|
+
setJukeboxUserType!: Sequelize.BelongsToSetAssociationMixin<JukeboxUserType, JukeboxUserTypeId>;
|
|
58
|
+
createJukeboxUserType!: Sequelize.BelongsToCreateAssociationMixin<JukeboxUserType>;
|
|
59
|
+
// JukeboxUser belongsTo PauseStatusType via pauseStatusTypeId
|
|
60
|
+
pauseStatusType!: PauseStatusType;
|
|
61
|
+
getPauseStatusType!: Sequelize.BelongsToGetAssociationMixin<PauseStatusType>;
|
|
62
|
+
setPauseStatusType!: Sequelize.BelongsToSetAssociationMixin<PauseStatusType, PauseStatusTypeId>;
|
|
63
|
+
createPauseStatusType!: Sequelize.BelongsToCreateAssociationMixin<PauseStatusType>;
|
|
64
|
+
|
|
65
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxUser {
|
|
66
|
+
return JukeboxUser.init({
|
|
67
|
+
id: {
|
|
68
|
+
type: DataTypes.UUID,
|
|
69
|
+
allowNull: false,
|
|
70
|
+
defaultValue: DataTypes.UUIDV4,
|
|
71
|
+
primaryKey: true
|
|
72
|
+
},
|
|
73
|
+
jukeboxSessionId: {
|
|
74
|
+
type: DataTypes.UUID,
|
|
75
|
+
allowNull: false,
|
|
76
|
+
references: {
|
|
77
|
+
model: 'jukebox_session',
|
|
78
|
+
key: 'id'
|
|
79
|
+
},
|
|
80
|
+
unique: "unique_jukebox_user_id",
|
|
81
|
+
field: 'jukebox_session_id'
|
|
82
|
+
},
|
|
83
|
+
appUserId: {
|
|
84
|
+
type: DataTypes.UUID,
|
|
85
|
+
allowNull: false,
|
|
86
|
+
references: {
|
|
87
|
+
model: 'app_user',
|
|
88
|
+
key: 'id'
|
|
89
|
+
},
|
|
90
|
+
unique: "unique_jukebox_user_id",
|
|
91
|
+
field: 'app_user_id'
|
|
92
|
+
},
|
|
93
|
+
createdAt: {
|
|
94
|
+
type: DataTypes.DATE,
|
|
95
|
+
allowNull: false,
|
|
96
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
97
|
+
field: 'created_at'
|
|
98
|
+
},
|
|
99
|
+
updatedAt: {
|
|
100
|
+
type: DataTypes.DATE,
|
|
101
|
+
allowNull: false,
|
|
102
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
103
|
+
field: 'updated_at'
|
|
104
|
+
},
|
|
105
|
+
enterDate: {
|
|
106
|
+
type: DataTypes.DATE,
|
|
107
|
+
allowNull: false,
|
|
108
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
109
|
+
field: 'enter_date'
|
|
110
|
+
},
|
|
111
|
+
exitDate: {
|
|
112
|
+
type: DataTypes.DATE,
|
|
113
|
+
allowNull: true,
|
|
114
|
+
field: 'exit_date'
|
|
115
|
+
},
|
|
116
|
+
jukeboxUserTypeId: {
|
|
117
|
+
type: DataTypes.SMALLINT,
|
|
118
|
+
allowNull: false,
|
|
119
|
+
defaultValue: 0,
|
|
120
|
+
references: {
|
|
121
|
+
model: 'jukebox_user_type',
|
|
122
|
+
key: 'id'
|
|
123
|
+
},
|
|
124
|
+
field: 'jukebox_user_type_id'
|
|
125
|
+
},
|
|
126
|
+
pauseStatusTypeId: {
|
|
127
|
+
type: DataTypes.SMALLINT,
|
|
128
|
+
allowNull: false,
|
|
129
|
+
defaultValue: 0,
|
|
130
|
+
references: {
|
|
131
|
+
model: 'pause_status_type',
|
|
132
|
+
key: 'id'
|
|
133
|
+
},
|
|
134
|
+
field: 'pause_status_type_id'
|
|
135
|
+
},
|
|
136
|
+
pausedQueueEntryId: {
|
|
137
|
+
type: DataTypes.UUID,
|
|
138
|
+
allowNull: true,
|
|
139
|
+
references: {
|
|
140
|
+
model: 'jukebox_queue_entry',
|
|
141
|
+
key: 'id'
|
|
142
|
+
},
|
|
143
|
+
field: 'paused_queue_entry_id'
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
sequelize,
|
|
147
|
+
tableName: 'jukebox_user',
|
|
148
|
+
schema: 'eb',
|
|
149
|
+
timestamps: false,
|
|
150
|
+
indexes: [
|
|
151
|
+
{
|
|
152
|
+
name: "idx_jukebox_user_app_user",
|
|
153
|
+
fields: [
|
|
154
|
+
{ name: "app_user_id" },
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "idx_jukebox_user_one_active_per_user",
|
|
159
|
+
unique: true,
|
|
160
|
+
fields: [
|
|
161
|
+
{ name: "app_user_id" },
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "jukebox_user_pkey",
|
|
166
|
+
unique: true,
|
|
167
|
+
fields: [
|
|
168
|
+
{ name: "id" },
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "unique_jukebox_user_id",
|
|
173
|
+
unique: true,
|
|
174
|
+
fields: [
|
|
175
|
+
{ name: "jukebox_session_id" },
|
|
176
|
+
{ name: "app_user_id" },
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -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 JukeboxUserTypeAttributes {
|
|
6
|
+
id: number;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type JukeboxUserTypePk = "id";
|
|
11
|
+
export type JukeboxUserTypeId = JukeboxUserType[JukeboxUserTypePk];
|
|
12
|
+
export type JukeboxUserTypeCreationAttributes = JukeboxUserTypeAttributes;
|
|
13
|
+
|
|
14
|
+
export class JukeboxUserType extends Model<JukeboxUserTypeAttributes, JukeboxUserTypeCreationAttributes> implements JukeboxUserTypeAttributes {
|
|
15
|
+
id!: number;
|
|
16
|
+
description!: string;
|
|
17
|
+
|
|
18
|
+
// JukeboxUserType hasMany JukeboxUser via jukeboxUserTypeId
|
|
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 JukeboxUserType {
|
|
32
|
+
return JukeboxUserType.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: 'jukebox_user_type',
|
|
45
|
+
schema: 'eb',
|
|
46
|
+
timestamps: false,
|
|
47
|
+
indexes: [
|
|
48
|
+
{
|
|
49
|
+
name: "jukebox_user_type_pkey",
|
|
50
|
+
unique: true,
|
|
51
|
+
fields: [
|
|
52
|
+
{ name: "id" },
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
|
|
4
|
+
export interface KnexMigrationsAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
batch?: number;
|
|
8
|
+
migrationTime?: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type KnexMigrationsPk = "id";
|
|
12
|
+
export type KnexMigrationsId = KnexMigrations[KnexMigrationsPk];
|
|
13
|
+
export type KnexMigrationsOptionalAttributes = "id" | "name" | "batch" | "migrationTime";
|
|
14
|
+
export type KnexMigrationsCreationAttributes = Optional<KnexMigrationsAttributes, KnexMigrationsOptionalAttributes>;
|
|
15
|
+
|
|
16
|
+
export class KnexMigrations extends Model<KnexMigrationsAttributes, KnexMigrationsCreationAttributes> implements KnexMigrationsAttributes {
|
|
17
|
+
id!: number;
|
|
18
|
+
name?: string;
|
|
19
|
+
batch?: number;
|
|
20
|
+
migrationTime?: Date;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrations {
|
|
24
|
+
return KnexMigrations.init({
|
|
25
|
+
id: {
|
|
26
|
+
autoIncrement: true,
|
|
27
|
+
type: DataTypes.INTEGER,
|
|
28
|
+
allowNull: false,
|
|
29
|
+
primaryKey: true
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
type: DataTypes.STRING(255),
|
|
33
|
+
allowNull: true
|
|
34
|
+
},
|
|
35
|
+
batch: {
|
|
36
|
+
type: DataTypes.INTEGER,
|
|
37
|
+
allowNull: true
|
|
38
|
+
},
|
|
39
|
+
migrationTime: {
|
|
40
|
+
type: DataTypes.DATE,
|
|
41
|
+
allowNull: true,
|
|
42
|
+
field: 'migration_time'
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
sequelize,
|
|
46
|
+
tableName: 'knex_migrations',
|
|
47
|
+
schema: 'public',
|
|
48
|
+
timestamps: false,
|
|
49
|
+
indexes: [
|
|
50
|
+
{
|
|
51
|
+
name: "knex_migrations_pkey",
|
|
52
|
+
unique: true,
|
|
53
|
+
fields: [
|
|
54
|
+
{ name: "id" },
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
|
|
4
|
+
export interface KnexMigrationsLockAttributes {
|
|
5
|
+
index: number;
|
|
6
|
+
isLocked?: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type KnexMigrationsLockPk = "index";
|
|
10
|
+
export type KnexMigrationsLockId = KnexMigrationsLock[KnexMigrationsLockPk];
|
|
11
|
+
export type KnexMigrationsLockOptionalAttributes = "index" | "isLocked";
|
|
12
|
+
export type KnexMigrationsLockCreationAttributes = Optional<KnexMigrationsLockAttributes, KnexMigrationsLockOptionalAttributes>;
|
|
13
|
+
|
|
14
|
+
export class KnexMigrationsLock extends Model<KnexMigrationsLockAttributes, KnexMigrationsLockCreationAttributes> implements KnexMigrationsLockAttributes {
|
|
15
|
+
index!: number;
|
|
16
|
+
isLocked?: number;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrationsLock {
|
|
20
|
+
return KnexMigrationsLock.init({
|
|
21
|
+
index: {
|
|
22
|
+
autoIncrement: true,
|
|
23
|
+
type: DataTypes.INTEGER,
|
|
24
|
+
allowNull: false,
|
|
25
|
+
primaryKey: true
|
|
26
|
+
},
|
|
27
|
+
isLocked: {
|
|
28
|
+
type: DataTypes.INTEGER,
|
|
29
|
+
allowNull: true,
|
|
30
|
+
field: 'is_locked'
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
sequelize,
|
|
34
|
+
tableName: 'knex_migrations_lock',
|
|
35
|
+
schema: 'public',
|
|
36
|
+
timestamps: false,
|
|
37
|
+
indexes: [
|
|
38
|
+
{
|
|
39
|
+
name: "knex_migrations_lock_pkey",
|
|
40
|
+
unique: true,
|
|
41
|
+
fields: [
|
|
42
|
+
{ name: "index" },
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
|
+
import type { MerchPlatform, MerchPlatformId } from './MerchPlatform';
|
|
5
|
+
import type { MerchType, MerchTypeId } from './MerchType';
|
|
6
|
+
import type { UserBookmarks, UserBookmarksId } from './UserBookmarks';
|
|
7
|
+
import type { UserComments, UserCommentsId } from './UserComments';
|
|
8
|
+
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
9
|
+
|
|
10
|
+
export interface MerchItemAttributes {
|
|
11
|
+
id: string;
|
|
12
|
+
canonArtistId: string;
|
|
13
|
+
merchTypeId: string;
|
|
14
|
+
merchPlatformId: string;
|
|
15
|
+
merchItemPlatformId: string;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
photo?: string;
|
|
19
|
+
popularity?: number;
|
|
20
|
+
inactive?: boolean;
|
|
21
|
+
createDate: Date;
|
|
22
|
+
updateDate: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type MerchItemPk = "id";
|
|
26
|
+
export type MerchItemId = MerchItem[MerchItemPk];
|
|
27
|
+
export type MerchItemOptionalAttributes = "id" | "photo" | "popularity" | "inactive" | "createDate" | "updateDate";
|
|
28
|
+
export type MerchItemCreationAttributes = Optional<MerchItemAttributes, MerchItemOptionalAttributes>;
|
|
29
|
+
|
|
30
|
+
export class MerchItem extends Model<MerchItemAttributes, MerchItemCreationAttributes> implements MerchItemAttributes {
|
|
31
|
+
id!: string;
|
|
32
|
+
canonArtistId!: string;
|
|
33
|
+
merchTypeId!: string;
|
|
34
|
+
merchPlatformId!: string;
|
|
35
|
+
merchItemPlatformId!: string;
|
|
36
|
+
title!: string;
|
|
37
|
+
description!: string;
|
|
38
|
+
photo?: string;
|
|
39
|
+
popularity?: number;
|
|
40
|
+
inactive?: boolean;
|
|
41
|
+
createDate!: Date;
|
|
42
|
+
updateDate!: Date;
|
|
43
|
+
|
|
44
|
+
// MerchItem belongsTo CanonArtist via canonArtistId
|
|
45
|
+
canonArtist!: CanonArtist;
|
|
46
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
47
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
48
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
49
|
+
// MerchItem hasMany UserBookmarks via merchItemId
|
|
50
|
+
userBookmarks!: UserBookmarks[];
|
|
51
|
+
getUserBookmarks!: Sequelize.HasManyGetAssociationsMixin<UserBookmarks>;
|
|
52
|
+
setUserBookmarks!: Sequelize.HasManySetAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
53
|
+
addUserBookmark!: Sequelize.HasManyAddAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
54
|
+
addUserBookmarks!: Sequelize.HasManyAddAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
55
|
+
createUserBookmark!: Sequelize.HasManyCreateAssociationMixin<UserBookmarks>;
|
|
56
|
+
removeUserBookmark!: Sequelize.HasManyRemoveAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
57
|
+
removeUserBookmarks!: Sequelize.HasManyRemoveAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
58
|
+
hasUserBookmark!: Sequelize.HasManyHasAssociationMixin<UserBookmarks, UserBookmarksId>;
|
|
59
|
+
hasUserBookmarks!: Sequelize.HasManyHasAssociationsMixin<UserBookmarks, UserBookmarksId>;
|
|
60
|
+
countUserBookmarks!: Sequelize.HasManyCountAssociationsMixin;
|
|
61
|
+
// MerchItem hasMany UserComments via merchItemId
|
|
62
|
+
userComments!: UserComments[];
|
|
63
|
+
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
|
64
|
+
setUserComments!: Sequelize.HasManySetAssociationsMixin<UserComments, UserCommentsId>;
|
|
65
|
+
addUserComment!: Sequelize.HasManyAddAssociationMixin<UserComments, UserCommentsId>;
|
|
66
|
+
addUserComments!: Sequelize.HasManyAddAssociationsMixin<UserComments, UserCommentsId>;
|
|
67
|
+
createUserComment!: Sequelize.HasManyCreateAssociationMixin<UserComments>;
|
|
68
|
+
removeUserComment!: Sequelize.HasManyRemoveAssociationMixin<UserComments, UserCommentsId>;
|
|
69
|
+
removeUserComments!: Sequelize.HasManyRemoveAssociationsMixin<UserComments, UserCommentsId>;
|
|
70
|
+
hasUserComment!: Sequelize.HasManyHasAssociationMixin<UserComments, UserCommentsId>;
|
|
71
|
+
hasUserComments!: Sequelize.HasManyHasAssociationsMixin<UserComments, UserCommentsId>;
|
|
72
|
+
countUserComments!: Sequelize.HasManyCountAssociationsMixin;
|
|
73
|
+
// MerchItem hasMany UserLikes via merchItemId
|
|
74
|
+
userLikes!: UserLikes[];
|
|
75
|
+
getUserLikes!: Sequelize.HasManyGetAssociationsMixin<UserLikes>;
|
|
76
|
+
setUserLikes!: Sequelize.HasManySetAssociationsMixin<UserLikes, UserLikesId>;
|
|
77
|
+
addUserLike!: Sequelize.HasManyAddAssociationMixin<UserLikes, UserLikesId>;
|
|
78
|
+
addUserLikes!: Sequelize.HasManyAddAssociationsMixin<UserLikes, UserLikesId>;
|
|
79
|
+
createUserLike!: Sequelize.HasManyCreateAssociationMixin<UserLikes>;
|
|
80
|
+
removeUserLike!: Sequelize.HasManyRemoveAssociationMixin<UserLikes, UserLikesId>;
|
|
81
|
+
removeUserLikes!: Sequelize.HasManyRemoveAssociationsMixin<UserLikes, UserLikesId>;
|
|
82
|
+
hasUserLike!: Sequelize.HasManyHasAssociationMixin<UserLikes, UserLikesId>;
|
|
83
|
+
hasUserLikes!: Sequelize.HasManyHasAssociationsMixin<UserLikes, UserLikesId>;
|
|
84
|
+
countUserLikes!: Sequelize.HasManyCountAssociationsMixin;
|
|
85
|
+
// MerchItem belongsTo MerchPlatform via merchPlatformId
|
|
86
|
+
merchPlatform!: MerchPlatform;
|
|
87
|
+
getMerchPlatform!: Sequelize.BelongsToGetAssociationMixin<MerchPlatform>;
|
|
88
|
+
setMerchPlatform!: Sequelize.BelongsToSetAssociationMixin<MerchPlatform, MerchPlatformId>;
|
|
89
|
+
createMerchPlatform!: Sequelize.BelongsToCreateAssociationMixin<MerchPlatform>;
|
|
90
|
+
// MerchItem belongsTo MerchType via merchTypeId
|
|
91
|
+
merchType!: MerchType;
|
|
92
|
+
getMerchType!: Sequelize.BelongsToGetAssociationMixin<MerchType>;
|
|
93
|
+
setMerchType!: Sequelize.BelongsToSetAssociationMixin<MerchType, MerchTypeId>;
|
|
94
|
+
createMerchType!: Sequelize.BelongsToCreateAssociationMixin<MerchType>;
|
|
95
|
+
|
|
96
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof MerchItem {
|
|
97
|
+
return MerchItem.init({
|
|
98
|
+
id: {
|
|
99
|
+
type: DataTypes.UUID,
|
|
100
|
+
allowNull: false,
|
|
101
|
+
defaultValue: DataTypes.UUIDV4,
|
|
102
|
+
primaryKey: true
|
|
103
|
+
},
|
|
104
|
+
canonArtistId: {
|
|
105
|
+
type: DataTypes.UUID,
|
|
106
|
+
allowNull: false,
|
|
107
|
+
references: {
|
|
108
|
+
model: 'canon_artist',
|
|
109
|
+
key: 'id'
|
|
110
|
+
},
|
|
111
|
+
field: 'canon_artist_id'
|
|
112
|
+
},
|
|
113
|
+
merchTypeId: {
|
|
114
|
+
type: DataTypes.UUID,
|
|
115
|
+
allowNull: false,
|
|
116
|
+
references: {
|
|
117
|
+
model: 'merch_type',
|
|
118
|
+
key: 'id'
|
|
119
|
+
},
|
|
120
|
+
field: 'merch_type_id'
|
|
121
|
+
},
|
|
122
|
+
merchPlatformId: {
|
|
123
|
+
type: DataTypes.UUID,
|
|
124
|
+
allowNull: false,
|
|
125
|
+
references: {
|
|
126
|
+
model: 'merch_platform',
|
|
127
|
+
key: 'id'
|
|
128
|
+
},
|
|
129
|
+
field: 'merch_platform_id'
|
|
130
|
+
},
|
|
131
|
+
merchItemPlatformId: {
|
|
132
|
+
type: DataTypes.TEXT,
|
|
133
|
+
allowNull: false,
|
|
134
|
+
field: 'merch_item_platform_id'
|
|
135
|
+
},
|
|
136
|
+
title: {
|
|
137
|
+
type: DataTypes.TEXT,
|
|
138
|
+
allowNull: false
|
|
139
|
+
},
|
|
140
|
+
description: {
|
|
141
|
+
type: DataTypes.TEXT,
|
|
142
|
+
allowNull: false
|
|
143
|
+
},
|
|
144
|
+
photo: {
|
|
145
|
+
type: DataTypes.TEXT,
|
|
146
|
+
allowNull: true
|
|
147
|
+
},
|
|
148
|
+
popularity: {
|
|
149
|
+
type: DataTypes.SMALLINT,
|
|
150
|
+
allowNull: true
|
|
151
|
+
},
|
|
152
|
+
inactive: {
|
|
153
|
+
type: DataTypes.BOOLEAN,
|
|
154
|
+
allowNull: true,
|
|
155
|
+
defaultValue: false
|
|
156
|
+
},
|
|
157
|
+
createDate: {
|
|
158
|
+
type: DataTypes.DATE,
|
|
159
|
+
allowNull: false,
|
|
160
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
161
|
+
field: 'create_date'
|
|
162
|
+
},
|
|
163
|
+
updateDate: {
|
|
164
|
+
type: DataTypes.DATE,
|
|
165
|
+
allowNull: false,
|
|
166
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
167
|
+
field: 'update_date'
|
|
168
|
+
}
|
|
169
|
+
}, {
|
|
170
|
+
sequelize,
|
|
171
|
+
tableName: 'merch_item',
|
|
172
|
+
schema: 'eb',
|
|
173
|
+
timestamps: false,
|
|
174
|
+
indexes: [
|
|
175
|
+
{
|
|
176
|
+
name: "idx_merch_item_artist",
|
|
177
|
+
fields: [
|
|
178
|
+
{ name: "canon_artist_id" },
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "idx_merch_item_artist_create_date",
|
|
183
|
+
fields: [
|
|
184
|
+
{ name: "canon_artist_id" },
|
|
185
|
+
{ name: "create_date", order: "DESC" },
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: "merch_item_pkey",
|
|
190
|
+
unique: true,
|
|
191
|
+
fields: [
|
|
192
|
+
{ name: "id" },
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|