@earbug/db-models 0.0.60 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +10 -0
- package/.github/workflows/publish.yaml +266 -19
- package/Dockerfile.generate +19 -0
- package/dist/AffinityRelationshipType.d.ts +2 -2
- package/dist/AffinityRelationshipType.js +6 -6
- package/dist/AppUser.d.ts +5 -5
- package/dist/AppUser.js +7 -7
- package/dist/AppUserDevice.d.ts +2 -2
- package/dist/AppUserDevice.js +6 -6
- package/dist/AppUserDeviceClassicBackup20260906.d.ts +23 -0
- package/dist/AppUserDeviceClassicBackup20260906.js +46 -0
- package/dist/AppUserFollowRelation.d.ts +3 -3
- package/dist/AppUserFollowRelation.js +6 -6
- package/dist/AppUserPlatformRelation.d.ts +13 -13
- package/dist/AppUserPlatformRelation.js +25 -25
- package/dist/CanonAlbum.d.ts +5 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonArtist.d.ts +5 -5
- package/dist/CanonArtist.js +11 -11
- package/dist/CanonGenre.d.ts +3 -3
- package/dist/CanonGenre.js +6 -6
- package/dist/CanonLabel.d.ts +2 -2
- package/dist/CanonLabel.js +6 -6
- package/dist/CanonMember.d.ts +3 -3
- package/dist/CanonMember.js +6 -6
- package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
- package/dist/CanonMemberExternalReferenceRelation.js +5 -5
- package/dist/CanonTrack.d.ts +5 -5
- package/dist/CanonTrack.js +11 -11
- package/dist/ConfigParam.d.ts +2 -2
- package/dist/ConfigParam.js +5 -5
- package/dist/ExternalReference.d.ts +2 -2
- package/dist/ExternalReference.js +5 -5
- package/dist/FeedContentType.d.ts +2 -2
- package/dist/FeedContentType.js +4 -4
- package/dist/GuestUser.d.ts +5 -5
- package/dist/GuestUser.js +13 -13
- package/dist/JukeboxAccessType.d.ts +2 -2
- package/dist/JukeboxAccessType.js +4 -4
- package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
- package/dist/JukeboxCanonGenreRelation.js +6 -6
- package/dist/JukeboxInvite.d.ts +3 -3
- package/dist/JukeboxInvite.js +6 -6
- package/dist/JukeboxQueueEntry.d.ts +9 -9
- package/dist/JukeboxQueueEntry.js +25 -25
- package/dist/JukeboxQueueMode.d.ts +2 -2
- package/dist/JukeboxQueueMode.js +4 -4
- package/dist/JukeboxSession.d.ts +9 -9
- package/dist/JukeboxSession.js +20 -20
- package/dist/JukeboxSessionArtistAffinity.d.ts +2 -2
- package/dist/JukeboxSessionArtistAffinity.js +6 -6
- package/dist/JukeboxSessionGenreAffinity.d.ts +2 -2
- package/dist/JukeboxSessionGenreAffinity.js +6 -6
- package/dist/JukeboxTerminationCondition.d.ts +2 -2
- package/dist/JukeboxTerminationCondition.js +4 -4
- package/dist/JukeboxType.d.ts +2 -2
- package/dist/JukeboxType.js +4 -4
- package/dist/JukeboxUser.d.ts +7 -7
- package/dist/JukeboxUser.js +20 -20
- package/dist/KnexMigrations.d.ts +3 -3
- package/dist/KnexMigrations.js +6 -6
- package/dist/KnexMigrationsLock.d.ts +3 -3
- package/dist/KnexMigrationsLock.js +5 -5
- package/dist/MerchItem.d.ts +3 -3
- package/dist/MerchItem.js +6 -6
- package/dist/MerchOrchestration.d.ts +3 -3
- package/dist/MerchOrchestration.js +6 -6
- package/dist/MerchPlatform.d.ts +2 -2
- package/dist/MerchPlatform.js +6 -6
- package/dist/MerchType.d.ts +2 -2
- package/dist/MerchType.js +4 -4
- package/dist/MetricsDaily.d.ts +3 -3
- package/dist/MetricsDaily.js +4 -4
- package/dist/NewsSite.d.ts +3 -3
- package/dist/NewsSite.js +6 -6
- package/dist/Notification.d.ts +13 -13
- package/dist/Notification.js +33 -33
- package/dist/Platform.d.ts +2 -2
- package/dist/Platform.js +7 -7
- package/dist/PlatformAlbum.d.ts +5 -5
- package/dist/PlatformAlbum.js +10 -10
- package/dist/PlatformArtist.d.ts +5 -5
- package/dist/PlatformArtist.js +10 -10
- package/dist/PlatformGenre.d.ts +2 -2
- package/dist/PlatformGenre.js +6 -6
- package/dist/PlatformTrack.d.ts +3 -3
- package/dist/PlatformTrack.js +6 -6
- package/dist/PlatformUserAlbum.d.ts +2 -2
- package/dist/PlatformUserAlbum.js +6 -6
- package/dist/PlatformUserAlbumTrack.d.ts +4 -4
- package/dist/PlatformUserAlbumTrack.js +11 -11
- package/dist/PlatformUserPlaylist.d.ts +5 -5
- package/dist/PlatformUserPlaylist.js +11 -11
- package/dist/PlatformUserPlaylistArtistAffinity.d.ts +4 -4
- package/dist/PlatformUserPlaylistArtistAffinity.js +12 -12
- package/dist/PlatformUserPlaylistGenreAffinity.d.ts +2 -2
- package/dist/PlatformUserPlaylistGenreAffinity.js +6 -6
- package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
- package/dist/PlatformUserPlaylistTrack.js +17 -17
- package/dist/PlaybackStatus.d.ts +2 -2
- package/dist/PlaybackStatus.js +4 -4
- package/dist/RadioShow.d.ts +3 -3
- package/dist/RadioShow.js +6 -6
- package/dist/RadioShowMedia.d.ts +3 -3
- package/dist/RadioShowMedia.js +6 -6
- package/dist/RadioShowPlacement.d.ts +3 -3
- package/dist/RadioShowPlacement.js +6 -6
- package/dist/RadioShowPublishRequests.d.ts +3 -3
- package/dist/RadioShowPublishRequests.js +6 -6
- package/dist/State.d.ts +2 -2
- package/dist/State.js +4 -4
- package/dist/UnmatchedAlbum.d.ts +2 -2
- package/dist/UnmatchedAlbum.js +6 -6
- package/dist/UnmatchedArtist.d.ts +2 -2
- package/dist/UnmatchedArtist.js +6 -6
- package/dist/UserAbuseReports.d.ts +7 -7
- package/dist/UserAbuseReports.js +18 -18
- package/dist/UserAffinity.d.ts +2 -2
- package/dist/UserAffinity.js +6 -6
- package/dist/UserArtistAffinity.d.ts +2 -2
- package/dist/UserArtistAffinity.js +6 -6
- package/dist/UserBookmarks.d.ts +3 -3
- package/dist/UserBookmarks.js +6 -6
- package/dist/UserComments.d.ts +5 -5
- package/dist/UserComments.js +12 -12
- package/dist/UserContacts.d.ts +3 -3
- package/dist/UserContacts.js +7 -7
- package/dist/UserEngagementFactor.d.ts +2 -2
- package/dist/UserEngagementFactor.js +6 -6
- package/dist/UserGenreAffinity.d.ts +2 -2
- package/dist/UserGenreAffinity.js +6 -6
- package/dist/UserLikes.d.ts +3 -3
- package/dist/UserLikes.js +6 -6
- package/dist/UserMessages.d.ts +5 -5
- package/dist/UserMessages.js +15 -15
- package/dist/Versus.d.ts +5 -5
- package/dist/Versus.js +11 -11
- package/dist/VersusCoCreator.d.ts +4 -4
- package/dist/VersusCoCreator.js +12 -12
- package/dist/VersusOption.d.ts +3 -3
- package/dist/VersusOption.js +6 -6
- package/dist/VersusPublishIssue.d.ts +3 -3
- package/dist/VersusPublishIssue.js +6 -6
- package/dist/VersusQuestion.d.ts +2 -2
- package/dist/VersusQuestion.js +6 -6
- package/dist/VersusVote.d.ts +2 -2
- package/dist/VersusVote.js +6 -6
- package/dist/init-models.d.ts +349 -3
- package/dist/init-models.js +905 -1
- package/models/AffinityRelationshipType.ts +8 -8
- package/models/AppUser.ts +12 -12
- package/models/AppUserDevice.ts +8 -8
- package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
- package/models/AppUserFollowRelation.ts +9 -9
- package/models/AppUserPlatformRelation.ts +38 -38
- package/models/CanonAlbum.ts +15 -15
- package/models/CanonArtist.ts +16 -16
- package/models/CanonGenre.ts +9 -9
- package/models/CanonLabel.ts +8 -8
- package/models/CanonMember.ts +9 -9
- package/models/CanonMemberExternalReferenceRelation.ts +7 -7
- package/models/CanonTrack.ts +16 -16
- package/models/ConfigParam.ts +7 -7
- package/models/ExternalReference.ts +7 -7
- package/models/FeedContentType.ts +6 -6
- package/models/GuestUser.ts +18 -18
- package/models/JukeboxAccessType.ts +6 -6
- package/models/JukeboxCanonGenreRelation.ts +8 -8
- package/models/JukeboxInvite.ts +9 -9
- package/models/JukeboxQueueEntry.ts +34 -34
- package/models/JukeboxQueueMode.ts +6 -6
- package/models/JukeboxSession.ts +29 -29
- package/models/JukeboxSessionArtistAffinity.ts +8 -8
- package/models/JukeboxSessionGenreAffinity.ts +8 -8
- package/models/JukeboxTerminationCondition.ts +6 -6
- package/models/JukeboxType.ts +6 -6
- package/models/JukeboxUser.ts +27 -27
- package/models/KnexMigrations.ts +9 -9
- package/models/KnexMigrationsLock.ts +8 -8
- package/models/MerchItem.ts +9 -9
- package/models/MerchOrchestration.ts +9 -9
- package/models/MerchPlatform.ts +8 -8
- package/models/MerchType.ts +6 -6
- package/models/MetricsDaily.ts +7 -7
- package/models/NewsSite.ts +9 -9
- package/models/Notification.ts +46 -46
- package/models/Platform.ts +9 -9
- package/models/PlatformAlbum.ts +15 -15
- package/models/PlatformArtist.ts +15 -15
- package/models/PlatformGenre.ts +8 -8
- package/models/PlatformTrack.ts +9 -9
- package/models/PlatformUserAlbum.ts +8 -8
- package/models/PlatformUserAlbumTrack.ts +15 -15
- package/models/PlatformUserPlaylist.ts +16 -16
- package/models/PlatformUserPlaylistArtistAffinity.ts +16 -16
- package/models/PlatformUserPlaylistGenreAffinity.ts +8 -8
- package/models/PlatformUserPlaylistTrack.ts +24 -24
- package/models/PlaybackStatus.ts +6 -6
- package/models/RadioShow.ts +9 -9
- package/models/RadioShowMedia.ts +9 -9
- package/models/RadioShowPlacement.ts +9 -9
- package/models/RadioShowPublishRequests.ts +9 -9
- package/models/State.ts +6 -6
- package/models/UnmatchedAlbum.ts +8 -8
- package/models/UnmatchedArtist.ts +8 -8
- package/models/UserAbuseReports.ts +25 -25
- package/models/UserAffinity.ts +8 -8
- package/models/UserArtistAffinity.ts +8 -8
- package/models/UserBookmarks.ts +9 -9
- package/models/UserComments.ts +17 -17
- package/models/UserContacts.ts +10 -10
- package/models/UserEngagementFactor.ts +8 -8
- package/models/UserGenreAffinity.ts +8 -8
- package/models/UserLikes.ts +9 -9
- package/models/UserMessages.ts +20 -20
- package/models/Versus.ts +16 -16
- package/models/VersusCoCreator.ts +16 -16
- package/models/VersusOption.ts +9 -9
- package/models/VersusPublishIssue.ts +9 -9
- package/models/VersusQuestion.ts +8 -8
- package/models/VersusVote.ts +8 -8
- package/models/init-models.ts +1245 -0
- package/package.json +1 -1
- package/scripts/generate-and-upload.mjs +123 -0
- package/dist/CanonAlbumImageHarvested.d.ts +0 -30
- package/dist/CanonAlbumImageHarvested.js +0 -70
- package/dist/CanonArtistImageHarvested.d.ts +0 -30
- package/dist/CanonArtistImageHarvested.js +0 -70
- package/models/CanonAlbumImageHarvested.ts +0 -98
- package/models/CanonArtistImageHarvested.ts +0 -98
package/models/UserLikes.ts
CHANGED
|
@@ -8,11 +8,11 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
|
|
|
8
8
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
9
9
|
|
|
10
10
|
export interface UserLikesAttributes {
|
|
11
|
+
id: string;
|
|
11
12
|
appUserId: string;
|
|
12
13
|
jukeboxId?: string;
|
|
13
14
|
playlistId?: string;
|
|
14
15
|
radioShowId?: string;
|
|
15
|
-
id: string;
|
|
16
16
|
createDate: Date;
|
|
17
17
|
updateDate: Date;
|
|
18
18
|
merchItemId?: string;
|
|
@@ -21,15 +21,15 @@ export interface UserLikesAttributes {
|
|
|
21
21
|
|
|
22
22
|
export type UserLikesPk = "id";
|
|
23
23
|
export type UserLikesId = UserLikes[UserLikesPk];
|
|
24
|
-
export type UserLikesOptionalAttributes = "
|
|
24
|
+
export type UserLikesOptionalAttributes = "id" | "jukeboxId" | "playlistId" | "radioShowId" | "createDate" | "updateDate" | "merchItemId" | "newsArticleId";
|
|
25
25
|
export type UserLikesCreationAttributes = Optional<UserLikesAttributes, UserLikesOptionalAttributes>;
|
|
26
26
|
|
|
27
27
|
export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttributes> implements UserLikesAttributes {
|
|
28
|
+
id!: string;
|
|
28
29
|
appUserId!: string;
|
|
29
30
|
jukeboxId?: string;
|
|
30
31
|
playlistId?: string;
|
|
31
32
|
radioShowId?: string;
|
|
32
|
-
id!: string;
|
|
33
33
|
createDate!: Date;
|
|
34
34
|
updateDate!: Date;
|
|
35
35
|
merchItemId?: string;
|
|
@@ -68,6 +68,12 @@ export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttri
|
|
|
68
68
|
|
|
69
69
|
static initModel(sequelize: Sequelize.Sequelize): typeof UserLikes {
|
|
70
70
|
return UserLikes.init({
|
|
71
|
+
id: {
|
|
72
|
+
type: DataTypes.UUID,
|
|
73
|
+
allowNull: false,
|
|
74
|
+
defaultValue: DataTypes.UUIDV4,
|
|
75
|
+
primaryKey: true
|
|
76
|
+
},
|
|
71
77
|
appUserId: {
|
|
72
78
|
type: DataTypes.UUID,
|
|
73
79
|
allowNull: false,
|
|
@@ -104,12 +110,6 @@ export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttri
|
|
|
104
110
|
},
|
|
105
111
|
field: 'radio_show_id'
|
|
106
112
|
},
|
|
107
|
-
id: {
|
|
108
|
-
type: DataTypes.UUID,
|
|
109
|
-
allowNull: false,
|
|
110
|
-
defaultValue: DataTypes.UUIDV4,
|
|
111
|
-
primaryKey: true
|
|
112
|
-
},
|
|
113
113
|
createDate: {
|
|
114
114
|
type: DataTypes.DATE,
|
|
115
115
|
allowNull: false,
|
package/models/UserMessages.ts
CHANGED
|
@@ -4,34 +4,34 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
5
5
|
|
|
6
6
|
export interface UserMessagesAttributes {
|
|
7
|
+
id: string;
|
|
7
8
|
senderId: string;
|
|
8
9
|
recipientId: string;
|
|
9
10
|
message: string;
|
|
10
|
-
replyMessageId?: string;
|
|
11
|
-
id: string;
|
|
12
11
|
hasBeenRead: boolean;
|
|
13
12
|
hasBeenEdited: boolean;
|
|
14
13
|
hasDeletedBySender: boolean;
|
|
15
14
|
hasDeletedByReceiver: boolean;
|
|
15
|
+
replyMessageId?: string;
|
|
16
16
|
createDate: Date;
|
|
17
17
|
updateDate: Date;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type UserMessagesPk = "id";
|
|
21
21
|
export type UserMessagesId = UserMessages[UserMessagesPk];
|
|
22
|
-
export type UserMessagesOptionalAttributes = "
|
|
22
|
+
export type UserMessagesOptionalAttributes = "id" | "replyMessageId" | "createDate" | "updateDate";
|
|
23
23
|
export type UserMessagesCreationAttributes = Optional<UserMessagesAttributes, UserMessagesOptionalAttributes>;
|
|
24
24
|
|
|
25
25
|
export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCreationAttributes> implements UserMessagesAttributes {
|
|
26
|
+
id!: string;
|
|
26
27
|
senderId!: string;
|
|
27
28
|
recipientId!: string;
|
|
28
29
|
message!: string;
|
|
29
|
-
replyMessageId?: string;
|
|
30
|
-
id!: string;
|
|
31
30
|
hasBeenRead!: boolean;
|
|
32
31
|
hasBeenEdited!: boolean;
|
|
33
32
|
hasDeletedBySender!: boolean;
|
|
34
33
|
hasDeletedByReceiver!: boolean;
|
|
34
|
+
replyMessageId?: string;
|
|
35
35
|
createDate!: Date;
|
|
36
36
|
updateDate!: Date;
|
|
37
37
|
|
|
@@ -65,6 +65,12 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
|
|
|
65
65
|
|
|
66
66
|
static initModel(sequelize: Sequelize.Sequelize): typeof UserMessages {
|
|
67
67
|
return UserMessages.init({
|
|
68
|
+
id: {
|
|
69
|
+
type: DataTypes.UUID,
|
|
70
|
+
allowNull: false,
|
|
71
|
+
defaultValue: DataTypes.UUIDV4,
|
|
72
|
+
primaryKey: true
|
|
73
|
+
},
|
|
68
74
|
senderId: {
|
|
69
75
|
type: DataTypes.UUID,
|
|
70
76
|
allowNull: false,
|
|
@@ -87,21 +93,6 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
|
|
|
87
93
|
type: DataTypes.STRING(1000),
|
|
88
94
|
allowNull: false
|
|
89
95
|
},
|
|
90
|
-
replyMessageId: {
|
|
91
|
-
type: DataTypes.UUID,
|
|
92
|
-
allowNull: true,
|
|
93
|
-
references: {
|
|
94
|
-
model: 'user_messages',
|
|
95
|
-
key: 'id'
|
|
96
|
-
},
|
|
97
|
-
field: 'reply_message_id'
|
|
98
|
-
},
|
|
99
|
-
id: {
|
|
100
|
-
type: DataTypes.UUID,
|
|
101
|
-
allowNull: false,
|
|
102
|
-
defaultValue: DataTypes.UUIDV4,
|
|
103
|
-
primaryKey: true
|
|
104
|
-
},
|
|
105
96
|
hasBeenRead: {
|
|
106
97
|
type: DataTypes.BOOLEAN,
|
|
107
98
|
allowNull: false,
|
|
@@ -126,6 +117,15 @@ export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCrea
|
|
|
126
117
|
defaultValue: false,
|
|
127
118
|
field: 'has_deleted_by_receiver'
|
|
128
119
|
},
|
|
120
|
+
replyMessageId: {
|
|
121
|
+
type: DataTypes.UUID,
|
|
122
|
+
allowNull: true,
|
|
123
|
+
references: {
|
|
124
|
+
model: 'user_messages',
|
|
125
|
+
key: 'id'
|
|
126
|
+
},
|
|
127
|
+
field: 'reply_message_id'
|
|
128
|
+
},
|
|
129
129
|
createDate: {
|
|
130
130
|
type: DataTypes.DATE,
|
|
131
131
|
allowNull: false,
|
package/models/Versus.ts
CHANGED
|
@@ -22,6 +22,7 @@ import type { VersusVote, VersusVoteId } from './VersusVote';
|
|
|
22
22
|
import type { VersusVotingMode, VersusVotingModeId } from './VersusVotingMode';
|
|
23
23
|
|
|
24
24
|
export interface VersusAttributes {
|
|
25
|
+
id: string;
|
|
25
26
|
versusQuestionId: string;
|
|
26
27
|
canonTrackId?: string;
|
|
27
28
|
platformTrackId?: string;
|
|
@@ -40,9 +41,8 @@ export interface VersusAttributes {
|
|
|
40
41
|
startsAt?: Date;
|
|
41
42
|
endsAt?: Date;
|
|
42
43
|
creatorUserId: string;
|
|
43
|
-
publishedAt?: Date;
|
|
44
|
-
id: string;
|
|
45
44
|
publishRequested: boolean;
|
|
45
|
+
publishedAt?: Date;
|
|
46
46
|
deleted: boolean;
|
|
47
47
|
createdAt: Date;
|
|
48
48
|
updatedAt: Date;
|
|
@@ -50,10 +50,11 @@ export interface VersusAttributes {
|
|
|
50
50
|
|
|
51
51
|
export type VersusPk = "id";
|
|
52
52
|
export type VersusId = Versus[VersusPk];
|
|
53
|
-
export type VersusOptionalAttributes = "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "canonGenreId" | "themeText" | "versusEndVoteThresholdId" | "versusEndTimerDurationId" | "startsAt" | "endsAt" | "publishedAt" | "
|
|
53
|
+
export type VersusOptionalAttributes = "id" | "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "canonGenreId" | "themeText" | "versusEndVoteThresholdId" | "versusEndTimerDurationId" | "startsAt" | "endsAt" | "publishedAt" | "createdAt" | "updatedAt";
|
|
54
54
|
export type VersusCreationAttributes = Optional<VersusAttributes, VersusOptionalAttributes>;
|
|
55
55
|
|
|
56
56
|
export class Versus extends Model<VersusAttributes, VersusCreationAttributes> implements VersusAttributes {
|
|
57
|
+
id!: string;
|
|
57
58
|
versusQuestionId!: string;
|
|
58
59
|
canonTrackId?: string;
|
|
59
60
|
platformTrackId?: string;
|
|
@@ -72,9 +73,8 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
|
|
|
72
73
|
startsAt?: Date;
|
|
73
74
|
endsAt?: Date;
|
|
74
75
|
creatorUserId!: string;
|
|
75
|
-
publishedAt?: Date;
|
|
76
|
-
id!: string;
|
|
77
76
|
publishRequested!: boolean;
|
|
77
|
+
publishedAt?: Date;
|
|
78
78
|
deleted!: boolean;
|
|
79
79
|
createdAt!: Date;
|
|
80
80
|
updatedAt!: Date;
|
|
@@ -217,6 +217,12 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
|
|
|
217
217
|
|
|
218
218
|
static initModel(sequelize: Sequelize.Sequelize): typeof Versus {
|
|
219
219
|
return Versus.init({
|
|
220
|
+
id: {
|
|
221
|
+
type: DataTypes.UUID,
|
|
222
|
+
allowNull: false,
|
|
223
|
+
defaultValue: DataTypes.UUIDV4,
|
|
224
|
+
primaryKey: true
|
|
225
|
+
},
|
|
220
226
|
versusQuestionId: {
|
|
221
227
|
type: DataTypes.UUID,
|
|
222
228
|
allowNull: false,
|
|
@@ -367,23 +373,17 @@ export class Versus extends Model<VersusAttributes, VersusCreationAttributes> im
|
|
|
367
373
|
},
|
|
368
374
|
field: 'creator_user_id'
|
|
369
375
|
},
|
|
370
|
-
publishedAt: {
|
|
371
|
-
type: DataTypes.DATE,
|
|
372
|
-
allowNull: true,
|
|
373
|
-
field: 'published_at'
|
|
374
|
-
},
|
|
375
|
-
id: {
|
|
376
|
-
type: DataTypes.UUID,
|
|
377
|
-
allowNull: false,
|
|
378
|
-
defaultValue: DataTypes.UUIDV4,
|
|
379
|
-
primaryKey: true
|
|
380
|
-
},
|
|
381
376
|
publishRequested: {
|
|
382
377
|
type: DataTypes.BOOLEAN,
|
|
383
378
|
allowNull: false,
|
|
384
379
|
defaultValue: false,
|
|
385
380
|
field: 'publish_requested'
|
|
386
381
|
},
|
|
382
|
+
publishedAt: {
|
|
383
|
+
type: DataTypes.DATE,
|
|
384
|
+
allowNull: true,
|
|
385
|
+
field: 'published_at'
|
|
386
|
+
},
|
|
387
387
|
deleted: {
|
|
388
388
|
type: DataTypes.BOOLEAN,
|
|
389
389
|
allowNull: false,
|
|
@@ -4,11 +4,11 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { Versus, VersusId } from './Versus';
|
|
5
5
|
|
|
6
6
|
export interface VersusCoCreatorAttributes {
|
|
7
|
-
versusId: string;
|
|
8
7
|
id: string;
|
|
8
|
+
versusId: string;
|
|
9
|
+
appUserId: string;
|
|
9
10
|
createdAt: Date;
|
|
10
11
|
updatedAt: Date;
|
|
11
|
-
appUserId: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export type VersusCoCreatorPk = "id";
|
|
@@ -17,11 +17,11 @@ export type VersusCoCreatorOptionalAttributes = "id" | "createdAt" | "updatedAt"
|
|
|
17
17
|
export type VersusCoCreatorCreationAttributes = Optional<VersusCoCreatorAttributes, VersusCoCreatorOptionalAttributes>;
|
|
18
18
|
|
|
19
19
|
export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCreatorCreationAttributes> implements VersusCoCreatorAttributes {
|
|
20
|
-
versusId!: string;
|
|
21
20
|
id!: string;
|
|
21
|
+
versusId!: string;
|
|
22
|
+
appUserId!: string;
|
|
22
23
|
createdAt!: Date;
|
|
23
24
|
updatedAt!: Date;
|
|
24
|
-
appUserId!: string;
|
|
25
25
|
|
|
26
26
|
// VersusCoCreator belongsTo AppUser via appUserId
|
|
27
27
|
appUser!: AppUser;
|
|
@@ -36,6 +36,12 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
|
|
|
36
36
|
|
|
37
37
|
static initModel(sequelize: Sequelize.Sequelize): typeof VersusCoCreator {
|
|
38
38
|
return VersusCoCreator.init({
|
|
39
|
+
id: {
|
|
40
|
+
type: DataTypes.UUID,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
defaultValue: DataTypes.UUIDV4,
|
|
43
|
+
primaryKey: true
|
|
44
|
+
},
|
|
39
45
|
versusId: {
|
|
40
46
|
type: DataTypes.UUID,
|
|
41
47
|
allowNull: false,
|
|
@@ -45,11 +51,14 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
|
|
|
45
51
|
},
|
|
46
52
|
field: 'versus_id'
|
|
47
53
|
},
|
|
48
|
-
|
|
54
|
+
appUserId: {
|
|
49
55
|
type: DataTypes.UUID,
|
|
50
56
|
allowNull: false,
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
references: {
|
|
58
|
+
model: 'app_user',
|
|
59
|
+
key: 'id'
|
|
60
|
+
},
|
|
61
|
+
field: 'app_user_id'
|
|
53
62
|
},
|
|
54
63
|
createdAt: {
|
|
55
64
|
type: DataTypes.DATE,
|
|
@@ -62,15 +71,6 @@ export class VersusCoCreator extends Model<VersusCoCreatorAttributes, VersusCoCr
|
|
|
62
71
|
allowNull: false,
|
|
63
72
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
64
73
|
field: 'updated_at'
|
|
65
|
-
},
|
|
66
|
-
appUserId: {
|
|
67
|
-
type: DataTypes.UUID,
|
|
68
|
-
allowNull: false,
|
|
69
|
-
references: {
|
|
70
|
-
model: 'app_user',
|
|
71
|
-
key: 'id'
|
|
72
|
-
},
|
|
73
|
-
field: 'app_user_id'
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
sequelize,
|
package/models/VersusOption.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { Versus, VersusId } from './Versus';
|
|
|
11
11
|
import type { VersusEntityKind, VersusEntityKindId } from './VersusEntityKind';
|
|
12
12
|
|
|
13
13
|
export interface VersusOptionAttributes {
|
|
14
|
+
id: string;
|
|
14
15
|
versusId: string;
|
|
15
16
|
entityKindId: number;
|
|
16
17
|
sortOrder: number;
|
|
@@ -22,7 +23,6 @@ export interface VersusOptionAttributes {
|
|
|
22
23
|
platformArtistId?: string;
|
|
23
24
|
voteScore?: number;
|
|
24
25
|
resultsScore?: number;
|
|
25
|
-
id: string;
|
|
26
26
|
createdAt: Date;
|
|
27
27
|
updatedAt: Date;
|
|
28
28
|
deleted: boolean;
|
|
@@ -31,10 +31,11 @@ export interface VersusOptionAttributes {
|
|
|
31
31
|
|
|
32
32
|
export type VersusOptionPk = "id";
|
|
33
33
|
export type VersusOptionId = VersusOption[VersusOptionPk];
|
|
34
|
-
export type VersusOptionOptionalAttributes = "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "voteScore" | "resultsScore" | "
|
|
34
|
+
export type VersusOptionOptionalAttributes = "id" | "canonTrackId" | "platformTrackId" | "canonAlbumId" | "platformAlbumId" | "canonArtistId" | "platformArtistId" | "voteScore" | "resultsScore" | "createdAt" | "updatedAt" | "appUserId";
|
|
35
35
|
export type VersusOptionCreationAttributes = Optional<VersusOptionAttributes, VersusOptionOptionalAttributes>;
|
|
36
36
|
|
|
37
37
|
export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCreationAttributes> implements VersusOptionAttributes {
|
|
38
|
+
id!: string;
|
|
38
39
|
versusId!: string;
|
|
39
40
|
entityKindId!: number;
|
|
40
41
|
sortOrder!: number;
|
|
@@ -46,7 +47,6 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
|
|
|
46
47
|
platformArtistId?: string;
|
|
47
48
|
voteScore?: number;
|
|
48
49
|
resultsScore?: number;
|
|
49
|
-
id!: string;
|
|
50
50
|
createdAt!: Date;
|
|
51
51
|
updatedAt!: Date;
|
|
52
52
|
deleted!: boolean;
|
|
@@ -100,6 +100,12 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
|
|
|
100
100
|
|
|
101
101
|
static initModel(sequelize: Sequelize.Sequelize): typeof VersusOption {
|
|
102
102
|
return VersusOption.init({
|
|
103
|
+
id: {
|
|
104
|
+
type: DataTypes.UUID,
|
|
105
|
+
allowNull: false,
|
|
106
|
+
defaultValue: DataTypes.UUIDV4,
|
|
107
|
+
primaryKey: true
|
|
108
|
+
},
|
|
103
109
|
versusId: {
|
|
104
110
|
type: DataTypes.UUID,
|
|
105
111
|
allowNull: false,
|
|
@@ -187,12 +193,6 @@ export class VersusOption extends Model<VersusOptionAttributes, VersusOptionCrea
|
|
|
187
193
|
allowNull: true,
|
|
188
194
|
field: 'results_score'
|
|
189
195
|
},
|
|
190
|
-
id: {
|
|
191
|
-
type: DataTypes.UUID,
|
|
192
|
-
allowNull: false,
|
|
193
|
-
defaultValue: DataTypes.UUIDV4,
|
|
194
|
-
primaryKey: true
|
|
195
|
-
},
|
|
196
196
|
createdAt: {
|
|
197
197
|
type: DataTypes.DATE,
|
|
198
198
|
allowNull: false,
|
|
@@ -7,29 +7,29 @@ import type { Versus, VersusId } from './Versus';
|
|
|
7
7
|
import type { VersusEntityKind, VersusEntityKindId } from './VersusEntityKind';
|
|
8
8
|
|
|
9
9
|
export interface VersusPublishIssueAttributes {
|
|
10
|
+
id: string;
|
|
10
11
|
versusId: string;
|
|
11
12
|
entityKindId: number;
|
|
12
13
|
platformTrackId?: string;
|
|
13
14
|
platformAlbumId?: string;
|
|
14
15
|
platformArtistId?: string;
|
|
15
16
|
detail?: string;
|
|
16
|
-
id: string;
|
|
17
17
|
createdAt: Date;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type VersusPublishIssuePk = "id";
|
|
21
21
|
export type VersusPublishIssueId = VersusPublishIssue[VersusPublishIssuePk];
|
|
22
|
-
export type VersusPublishIssueOptionalAttributes = "
|
|
22
|
+
export type VersusPublishIssueOptionalAttributes = "id" | "platformTrackId" | "platformAlbumId" | "platformArtistId" | "detail" | "createdAt";
|
|
23
23
|
export type VersusPublishIssueCreationAttributes = Optional<VersusPublishIssueAttributes, VersusPublishIssueOptionalAttributes>;
|
|
24
24
|
|
|
25
25
|
export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, VersusPublishIssueCreationAttributes> implements VersusPublishIssueAttributes {
|
|
26
|
+
id!: string;
|
|
26
27
|
versusId!: string;
|
|
27
28
|
entityKindId!: number;
|
|
28
29
|
platformTrackId?: string;
|
|
29
30
|
platformAlbumId?: string;
|
|
30
31
|
platformArtistId?: string;
|
|
31
32
|
detail?: string;
|
|
32
|
-
id!: string;
|
|
33
33
|
createdAt!: Date;
|
|
34
34
|
|
|
35
35
|
// VersusPublishIssue belongsTo PlatformAlbum via platformAlbumId
|
|
@@ -60,6 +60,12 @@ export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, Vers
|
|
|
60
60
|
|
|
61
61
|
static initModel(sequelize: Sequelize.Sequelize): typeof VersusPublishIssue {
|
|
62
62
|
return VersusPublishIssue.init({
|
|
63
|
+
id: {
|
|
64
|
+
type: DataTypes.UUID,
|
|
65
|
+
allowNull: false,
|
|
66
|
+
defaultValue: DataTypes.UUIDV4,
|
|
67
|
+
primaryKey: true
|
|
68
|
+
},
|
|
63
69
|
versusId: {
|
|
64
70
|
type: DataTypes.UUID,
|
|
65
71
|
allowNull: false,
|
|
@@ -109,12 +115,6 @@ export class VersusPublishIssue extends Model<VersusPublishIssueAttributes, Vers
|
|
|
109
115
|
type: DataTypes.TEXT,
|
|
110
116
|
allowNull: true
|
|
111
117
|
},
|
|
112
|
-
id: {
|
|
113
|
-
type: DataTypes.UUID,
|
|
114
|
-
allowNull: false,
|
|
115
|
-
defaultValue: DataTypes.UUIDV4,
|
|
116
|
-
primaryKey: true
|
|
117
|
-
},
|
|
118
118
|
createdAt: {
|
|
119
119
|
type: DataTypes.DATE,
|
|
120
120
|
allowNull: false,
|
package/models/VersusQuestion.ts
CHANGED
|
@@ -5,10 +5,10 @@ import type { VersusQuestionVariableType, VersusQuestionVariableTypeId } from '.
|
|
|
5
5
|
import type { VersusVotingListType, VersusVotingListTypeId } from './VersusVotingListType';
|
|
6
6
|
|
|
7
7
|
export interface VersusQuestionAttributes {
|
|
8
|
+
id: string;
|
|
8
9
|
questionTemplate: string;
|
|
9
10
|
questionVariableTypeId: number;
|
|
10
11
|
votingListTypeId: number;
|
|
11
|
-
id: string;
|
|
12
12
|
createdAt: Date;
|
|
13
13
|
updatedAt: Date;
|
|
14
14
|
}
|
|
@@ -19,10 +19,10 @@ export type VersusQuestionOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
|
19
19
|
export type VersusQuestionCreationAttributes = Optional<VersusQuestionAttributes, VersusQuestionOptionalAttributes>;
|
|
20
20
|
|
|
21
21
|
export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuestionCreationAttributes> implements VersusQuestionAttributes {
|
|
22
|
+
id!: string;
|
|
22
23
|
questionTemplate!: string;
|
|
23
24
|
questionVariableTypeId!: number;
|
|
24
25
|
votingListTypeId!: number;
|
|
25
|
-
id!: string;
|
|
26
26
|
createdAt!: Date;
|
|
27
27
|
updatedAt!: Date;
|
|
28
28
|
|
|
@@ -51,6 +51,12 @@ export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuesti
|
|
|
51
51
|
|
|
52
52
|
static initModel(sequelize: Sequelize.Sequelize): typeof VersusQuestion {
|
|
53
53
|
return VersusQuestion.init({
|
|
54
|
+
id: {
|
|
55
|
+
type: DataTypes.UUID,
|
|
56
|
+
allowNull: false,
|
|
57
|
+
defaultValue: DataTypes.UUIDV4,
|
|
58
|
+
primaryKey: true
|
|
59
|
+
},
|
|
54
60
|
questionTemplate: {
|
|
55
61
|
type: DataTypes.TEXT,
|
|
56
62
|
allowNull: false,
|
|
@@ -74,12 +80,6 @@ export class VersusQuestion extends Model<VersusQuestionAttributes, VersusQuesti
|
|
|
74
80
|
},
|
|
75
81
|
field: 'voting_list_type_id'
|
|
76
82
|
},
|
|
77
|
-
id: {
|
|
78
|
-
type: DataTypes.UUID,
|
|
79
|
-
allowNull: false,
|
|
80
|
-
defaultValue: DataTypes.UUIDV4,
|
|
81
|
-
primaryKey: true
|
|
82
|
-
},
|
|
83
83
|
createdAt: {
|
|
84
84
|
type: DataTypes.DATE,
|
|
85
85
|
allowNull: false,
|
package/models/VersusVote.ts
CHANGED
|
@@ -4,9 +4,9 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { Versus, VersusId } from './Versus';
|
|
5
5
|
|
|
6
6
|
export interface VersusVoteAttributes {
|
|
7
|
+
id: string;
|
|
7
8
|
versusId: string;
|
|
8
9
|
appUserId: string;
|
|
9
|
-
id: string;
|
|
10
10
|
createdAt: Date;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -16,9 +16,9 @@ export type VersusVoteOptionalAttributes = "id" | "createdAt";
|
|
|
16
16
|
export type VersusVoteCreationAttributes = Optional<VersusVoteAttributes, VersusVoteOptionalAttributes>;
|
|
17
17
|
|
|
18
18
|
export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAttributes> implements VersusVoteAttributes {
|
|
19
|
+
id!: string;
|
|
19
20
|
versusId!: string;
|
|
20
21
|
appUserId!: string;
|
|
21
|
-
id!: string;
|
|
22
22
|
createdAt!: Date;
|
|
23
23
|
|
|
24
24
|
// VersusVote belongsTo AppUser via appUserId
|
|
@@ -34,6 +34,12 @@ export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAt
|
|
|
34
34
|
|
|
35
35
|
static initModel(sequelize: Sequelize.Sequelize): typeof VersusVote {
|
|
36
36
|
return VersusVote.init({
|
|
37
|
+
id: {
|
|
38
|
+
type: DataTypes.UUID,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
defaultValue: DataTypes.UUIDV4,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
37
43
|
versusId: {
|
|
38
44
|
type: DataTypes.UUID,
|
|
39
45
|
allowNull: false,
|
|
@@ -54,12 +60,6 @@ export class VersusVote extends Model<VersusVoteAttributes, VersusVoteCreationAt
|
|
|
54
60
|
unique: "uq_versus_vote_versus_app_user",
|
|
55
61
|
field: 'app_user_id'
|
|
56
62
|
},
|
|
57
|
-
id: {
|
|
58
|
-
type: DataTypes.UUID,
|
|
59
|
-
allowNull: false,
|
|
60
|
-
defaultValue: DataTypes.UUIDV4,
|
|
61
|
-
primaryKey: true
|
|
62
|
-
},
|
|
63
63
|
createdAt: {
|
|
64
64
|
type: DataTypes.DATE,
|
|
65
65
|
allowNull: false,
|