@earbug/db-models 0.0.59 → 0.0.62
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/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/package.json +5 -2
- package/.github/workflows/publish.yaml +0 -56
- package/.nvmrc +0 -1
- 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/model_options.json +0 -3
- package/models/AccessControlPreference.ts +0 -53
- package/models/AffinityRelationshipType.ts +0 -96
- package/models/AffinityTier.ts +0 -131
- package/models/AppUser.ts +0 -577
- package/models/AppUserDevice.ts +0 -101
- package/models/AppUserFollowRelation.ts +0 -128
- package/models/AppUserPlatformRelation.ts +0 -150
- package/models/CanonAlbum.ts +0 -229
- package/models/CanonAlbumExternalReferenceRelation.ts +0 -92
- package/models/CanonAlbumGenreRelation.ts +0 -86
- package/models/CanonAlbumImageHarvested.ts +0 -98
- package/models/CanonAlbumLabelRelation.ts +0 -86
- package/models/CanonAlbumTrackRelation.ts +0 -92
- package/models/CanonArtist.ts +0 -356
- package/models/CanonArtistAlbumRelation.ts +0 -92
- package/models/CanonArtistExternalReferenceRelation.ts +0 -92
- package/models/CanonArtistGenreRelation.ts +0 -86
- package/models/CanonArtistImageHarvested.ts +0 -98
- package/models/CanonArtistMemberRelation.ts +0 -86
- package/models/CanonArtistTrackRelation.ts +0 -92
- package/models/CanonGenre.ts +0 -273
- package/models/CanonGenreExternalReferenceRelation.ts +0 -92
- package/models/CanonLabel.ts +0 -129
- package/models/CanonLabelExternalReferenceRelation.ts +0 -92
- package/models/CanonMember.ts +0 -130
- package/models/CanonMemberExternalReferenceRelation.ts +0 -99
- package/models/CanonToPlatformAlbumRelation.ts +0 -92
- package/models/CanonToPlatformArtistRelation.ts +0 -92
- package/models/CanonToPlatformGenreRelation.ts +0 -86
- package/models/CanonToPlatformTrackRelation.ts +0 -92
- package/models/CanonTrack.ts +0 -232
- package/models/ConfigParam.ts +0 -62
- package/models/ExternalReference.ts +0 -201
- package/models/FeedConfig.ts +0 -65
- package/models/FeedContentType.ts +0 -124
- package/models/GuestUser.ts +0 -137
- package/models/JukeboxAccessType.ts +0 -60
- package/models/JukeboxCanonGenreRelation.ts +0 -108
- package/models/JukeboxInvite.ts +0 -125
- package/models/JukeboxQueueEntry.ts +0 -247
- package/models/JukeboxQueueMode.ts +0 -60
- package/models/JukeboxSession.ts +0 -334
- package/models/JukeboxSessionArtistAffinity.ts +0 -136
- package/models/JukeboxSessionGenreAffinity.ts +0 -136
- package/models/JukeboxStatus.ts +0 -58
- package/models/JukeboxTerminationCondition.ts +0 -60
- package/models/JukeboxType.ts +0 -60
- package/models/JukeboxUser.ts +0 -182
- package/models/JukeboxUserType.ts +0 -58
- package/models/KnexMigrations.ts +0 -60
- package/models/KnexMigrationsLock.ts +0 -48
- package/models/MerchItem.ts +0 -198
- package/models/MerchOrchestration.ts +0 -130
- package/models/MerchPlatform.ts +0 -95
- package/models/MerchType.ts +0 -89
- package/models/MetricsDaily.ts +0 -79
- package/models/MetricsEvent.ts +0 -124
- package/models/NewsArticle.ts +0 -177
- package/models/NewsPlatform.ts +0 -76
- package/models/NewsSite.ts +0 -75
- package/models/Notification.ts +0 -214
- package/models/NotificationType.ts +0 -66
- package/models/PauseStatusType.ts +0 -58
- package/models/Platform.ts +0 -189
- package/models/PlatformAlbum.ts +0 -398
- package/models/PlatformAlbumGenreRelation.ts +0 -86
- package/models/PlatformAlbumTrackRelation.ts +0 -92
- package/models/PlatformArtist.ts +0 -358
- package/models/PlatformArtistAlbumRelation.ts +0 -92
- package/models/PlatformArtistGenreRelation.ts +0 -86
- package/models/PlatformArtistTrackRelation.ts +0 -92
- package/models/PlatformGenre.ts +0 -194
- package/models/PlatformTrack.ts +0 -339
- package/models/PlatformTrackGenreRelation.ts +0 -86
- package/models/PlatformUserAlbum.ts +0 -152
- package/models/PlatformUserAlbumTrack.ts +0 -138
- package/models/PlatformUserPlaylist.ts +0 -260
- package/models/PlatformUserPlaylistArtistAffinity.ts +0 -136
- package/models/PlatformUserPlaylistGenreAffinity.ts +0 -136
- package/models/PlatformUserPlaylistTrack.ts +0 -162
- package/models/PlaybackStatus.ts +0 -47
- package/models/PlaybackStatusType.ts +0 -58
- package/models/RadioShow.ts +0 -209
- package/models/RadioShowGenres.ts +0 -107
- package/models/RadioShowMedia.ts +0 -181
- package/models/RadioShowPlacement.ts +0 -115
- package/models/RadioShowPublishRequests.ts +0 -86
- package/models/State.ts +0 -86
- package/models/TrackDeletionReason.ts +0 -58
- package/models/UnmatchedAlbum.ts +0 -66
- package/models/UnmatchedArtist.ts +0 -81
- package/models/UserAbuseReports.ts +0 -232
- package/models/UserAffinity.ts +0 -117
- package/models/UserArtistAffinity.ts +0 -136
- package/models/UserBookmarks.ts +0 -235
- package/models/UserComments.ts +0 -271
- package/models/UserContacts.ts +0 -155
- package/models/UserEngagementFactor.ts +0 -109
- package/models/UserGenreAffinity.ts +0 -136
- package/models/UserLikes.ts +0 -235
- package/models/UserMessages.ts +0 -189
- package/models/Versus.ts +0 -438
- package/models/VersusAccessType.ts +0 -66
- package/models/VersusCoCreator.ts +0 -111
- package/models/VersusCreatorScope.ts +0 -66
- package/models/VersusEndMode.ts +0 -66
- package/models/VersusEndTimerDuration.ts +0 -81
- package/models/VersusEndVoteThreshold.ts +0 -67
- package/models/VersusEntityKind.ts +0 -79
- package/models/VersusOption.ts +0 -258
- package/models/VersusPublishIssue.ts +0 -146
- package/models/VersusQuestion.ts +0 -123
- package/models/VersusQuestionVariableType.ts +0 -66
- package/models/VersusVote.ts +0 -99
- package/models/VersusVotingListType.ts +0 -66
- package/models/VersusVotingMode.ts +0 -66
- package/models/index.ts +0 -3
- package/models/init-models.ts +0 -14
- package/models/initDb.ts +0 -72
- package/models/rdsCaBundle.ts +0 -5
- package/scripts/update-rds-ca-bundle.mjs +0 -44
- package/tsconfig.json +0 -52
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
-
import type { FeedContentType, FeedContentTypeId } from './FeedContentType';
|
|
5
|
-
|
|
6
|
-
export interface UserEngagementFactorAttributes {
|
|
7
|
-
userId: string;
|
|
8
|
-
contentTypeId: string;
|
|
9
|
-
id: string;
|
|
10
|
-
engagementFactor: number;
|
|
11
|
-
createDate?: Date;
|
|
12
|
-
updateDate?: Date;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type UserEngagementFactorPk = "id";
|
|
16
|
-
export type UserEngagementFactorId = UserEngagementFactor[UserEngagementFactorPk];
|
|
17
|
-
export type UserEngagementFactorOptionalAttributes = "id" | "engagementFactor" | "createDate" | "updateDate";
|
|
18
|
-
export type UserEngagementFactorCreationAttributes = Optional<UserEngagementFactorAttributes, UserEngagementFactorOptionalAttributes>;
|
|
19
|
-
|
|
20
|
-
export class UserEngagementFactor extends Model<UserEngagementFactorAttributes, UserEngagementFactorCreationAttributes> implements UserEngagementFactorAttributes {
|
|
21
|
-
userId!: string;
|
|
22
|
-
contentTypeId!: string;
|
|
23
|
-
id!: string;
|
|
24
|
-
engagementFactor!: number;
|
|
25
|
-
createDate?: Date;
|
|
26
|
-
updateDate?: Date;
|
|
27
|
-
|
|
28
|
-
// UserEngagementFactor belongsTo AppUser via userId
|
|
29
|
-
user!: AppUser;
|
|
30
|
-
getUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
31
|
-
setUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
32
|
-
createUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
33
|
-
// UserEngagementFactor belongsTo FeedContentType via contentTypeId
|
|
34
|
-
contentType!: FeedContentType;
|
|
35
|
-
getContentType!: Sequelize.BelongsToGetAssociationMixin<FeedContentType>;
|
|
36
|
-
setContentType!: Sequelize.BelongsToSetAssociationMixin<FeedContentType, FeedContentTypeId>;
|
|
37
|
-
createContentType!: Sequelize.BelongsToCreateAssociationMixin<FeedContentType>;
|
|
38
|
-
|
|
39
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof UserEngagementFactor {
|
|
40
|
-
return UserEngagementFactor.init({
|
|
41
|
-
userId: {
|
|
42
|
-
type: DataTypes.UUID,
|
|
43
|
-
allowNull: false,
|
|
44
|
-
references: {
|
|
45
|
-
model: 'app_user',
|
|
46
|
-
key: 'id'
|
|
47
|
-
},
|
|
48
|
-
unique: "user_engagement_factor_user_id_content_type_id_unique",
|
|
49
|
-
field: 'user_id'
|
|
50
|
-
},
|
|
51
|
-
contentTypeId: {
|
|
52
|
-
type: DataTypes.UUID,
|
|
53
|
-
allowNull: false,
|
|
54
|
-
references: {
|
|
55
|
-
model: 'feed_content_type',
|
|
56
|
-
key: 'id'
|
|
57
|
-
},
|
|
58
|
-
unique: "user_engagement_factor_user_id_content_type_id_unique",
|
|
59
|
-
field: 'content_type_id'
|
|
60
|
-
},
|
|
61
|
-
id: {
|
|
62
|
-
type: DataTypes.UUID,
|
|
63
|
-
allowNull: false,
|
|
64
|
-
defaultValue: DataTypes.UUIDV4,
|
|
65
|
-
primaryKey: true
|
|
66
|
-
},
|
|
67
|
-
engagementFactor: {
|
|
68
|
-
type: DataTypes.DECIMAL,
|
|
69
|
-
allowNull: false,
|
|
70
|
-
defaultValue: 1,
|
|
71
|
-
field: 'engagement_factor'
|
|
72
|
-
},
|
|
73
|
-
createDate: {
|
|
74
|
-
type: DataTypes.DATE,
|
|
75
|
-
allowNull: true,
|
|
76
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
77
|
-
field: 'create_date'
|
|
78
|
-
},
|
|
79
|
-
updateDate: {
|
|
80
|
-
type: DataTypes.DATE,
|
|
81
|
-
allowNull: true,
|
|
82
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
83
|
-
field: 'update_date'
|
|
84
|
-
}
|
|
85
|
-
}, {
|
|
86
|
-
sequelize,
|
|
87
|
-
tableName: 'user_engagement_factor',
|
|
88
|
-
schema: 'eb',
|
|
89
|
-
timestamps: false,
|
|
90
|
-
indexes: [
|
|
91
|
-
{
|
|
92
|
-
name: "user_engagement_factor_pkey",
|
|
93
|
-
unique: true,
|
|
94
|
-
fields: [
|
|
95
|
-
{ name: "id" },
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: "user_engagement_factor_user_id_content_type_id_unique",
|
|
100
|
-
unique: true,
|
|
101
|
-
fields: [
|
|
102
|
-
{ name: "user_id" },
|
|
103
|
-
{ name: "content_type_id" },
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
|
-
]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AffinityTier, AffinityTierId } from './AffinityTier';
|
|
4
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
5
|
-
import type { CanonGenre, CanonGenreId } from './CanonGenre';
|
|
6
|
-
|
|
7
|
-
export interface UserGenreAffinityAttributes {
|
|
8
|
-
userId: string;
|
|
9
|
-
canonGenreId: string;
|
|
10
|
-
affinityTierId: number;
|
|
11
|
-
rank: number;
|
|
12
|
-
id: string;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
updatedAt: Date;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type UserGenreAffinityPk = "id";
|
|
18
|
-
export type UserGenreAffinityId = UserGenreAffinity[UserGenreAffinityPk];
|
|
19
|
-
export type UserGenreAffinityOptionalAttributes = "id" | "createdAt" | "updatedAt";
|
|
20
|
-
export type UserGenreAffinityCreationAttributes = Optional<UserGenreAffinityAttributes, UserGenreAffinityOptionalAttributes>;
|
|
21
|
-
|
|
22
|
-
export class UserGenreAffinity extends Model<UserGenreAffinityAttributes, UserGenreAffinityCreationAttributes> implements UserGenreAffinityAttributes {
|
|
23
|
-
userId!: string;
|
|
24
|
-
canonGenreId!: string;
|
|
25
|
-
affinityTierId!: number;
|
|
26
|
-
rank!: number;
|
|
27
|
-
id!: string;
|
|
28
|
-
createdAt!: Date;
|
|
29
|
-
updatedAt!: Date;
|
|
30
|
-
|
|
31
|
-
// UserGenreAffinity belongsTo AffinityTier via affinityTierId
|
|
32
|
-
affinityTier!: AffinityTier;
|
|
33
|
-
getAffinityTier!: Sequelize.BelongsToGetAssociationMixin<AffinityTier>;
|
|
34
|
-
setAffinityTier!: Sequelize.BelongsToSetAssociationMixin<AffinityTier, AffinityTierId>;
|
|
35
|
-
createAffinityTier!: Sequelize.BelongsToCreateAssociationMixin<AffinityTier>;
|
|
36
|
-
// UserGenreAffinity belongsTo AppUser via userId
|
|
37
|
-
user!: AppUser;
|
|
38
|
-
getUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
39
|
-
setUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
40
|
-
createUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
41
|
-
// UserGenreAffinity belongsTo CanonGenre via canonGenreId
|
|
42
|
-
canonGenre!: CanonGenre;
|
|
43
|
-
getCanonGenre!: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
|
|
44
|
-
setCanonGenre!: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
|
|
45
|
-
createCanonGenre!: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
|
|
46
|
-
|
|
47
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof UserGenreAffinity {
|
|
48
|
-
return UserGenreAffinity.init({
|
|
49
|
-
userId: {
|
|
50
|
-
type: DataTypes.UUID,
|
|
51
|
-
allowNull: false,
|
|
52
|
-
references: {
|
|
53
|
-
model: 'app_user',
|
|
54
|
-
key: 'id'
|
|
55
|
-
},
|
|
56
|
-
unique: "user_genre_affinity_user_id_canon_genre_id_unique",
|
|
57
|
-
field: 'user_id'
|
|
58
|
-
},
|
|
59
|
-
canonGenreId: {
|
|
60
|
-
type: DataTypes.UUID,
|
|
61
|
-
allowNull: false,
|
|
62
|
-
references: {
|
|
63
|
-
model: 'canon_genre',
|
|
64
|
-
key: 'id'
|
|
65
|
-
},
|
|
66
|
-
unique: "user_genre_affinity_user_id_canon_genre_id_unique",
|
|
67
|
-
field: 'canon_genre_id'
|
|
68
|
-
},
|
|
69
|
-
affinityTierId: {
|
|
70
|
-
type: DataTypes.SMALLINT,
|
|
71
|
-
allowNull: false,
|
|
72
|
-
references: {
|
|
73
|
-
model: 'affinity_tier',
|
|
74
|
-
key: 'id'
|
|
75
|
-
},
|
|
76
|
-
field: 'affinity_tier_id'
|
|
77
|
-
},
|
|
78
|
-
rank: {
|
|
79
|
-
type: DataTypes.INTEGER,
|
|
80
|
-
allowNull: false
|
|
81
|
-
},
|
|
82
|
-
id: {
|
|
83
|
-
type: DataTypes.UUID,
|
|
84
|
-
allowNull: false,
|
|
85
|
-
defaultValue: DataTypes.UUIDV4,
|
|
86
|
-
primaryKey: true
|
|
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: 'user_genre_affinity',
|
|
103
|
-
schema: 'eb',
|
|
104
|
-
timestamps: false,
|
|
105
|
-
indexes: [
|
|
106
|
-
{
|
|
107
|
-
name: "idx_user_genre_affinity_genre",
|
|
108
|
-
fields: [
|
|
109
|
-
{ name: "canon_genre_id" },
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "idx_user_genre_affinity_session",
|
|
114
|
-
fields: [
|
|
115
|
-
{ name: "user_id" },
|
|
116
|
-
]
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "user_genre_affinity_pkey",
|
|
120
|
-
unique: true,
|
|
121
|
-
fields: [
|
|
122
|
-
{ name: "id" },
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "user_genre_affinity_user_id_canon_genre_id_unique",
|
|
127
|
-
unique: true,
|
|
128
|
-
fields: [
|
|
129
|
-
{ name: "user_id" },
|
|
130
|
-
{ name: "canon_genre_id" },
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
]
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
package/models/UserLikes.ts
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
-
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
5
|
-
import type { MerchItem, MerchItemId } from './MerchItem';
|
|
6
|
-
import type { NewsArticle, NewsArticleId } from './NewsArticle';
|
|
7
|
-
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
8
|
-
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
9
|
-
|
|
10
|
-
export interface UserLikesAttributes {
|
|
11
|
-
appUserId: string;
|
|
12
|
-
jukeboxId?: string;
|
|
13
|
-
playlistId?: string;
|
|
14
|
-
radioShowId?: string;
|
|
15
|
-
id: string;
|
|
16
|
-
createDate: Date;
|
|
17
|
-
updateDate: Date;
|
|
18
|
-
merchItemId?: string;
|
|
19
|
-
newsArticleId?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type UserLikesPk = "id";
|
|
23
|
-
export type UserLikesId = UserLikes[UserLikesPk];
|
|
24
|
-
export type UserLikesOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "createDate" | "updateDate" | "merchItemId" | "newsArticleId";
|
|
25
|
-
export type UserLikesCreationAttributes = Optional<UserLikesAttributes, UserLikesOptionalAttributes>;
|
|
26
|
-
|
|
27
|
-
export class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttributes> implements UserLikesAttributes {
|
|
28
|
-
appUserId!: string;
|
|
29
|
-
jukeboxId?: string;
|
|
30
|
-
playlistId?: string;
|
|
31
|
-
radioShowId?: string;
|
|
32
|
-
id!: string;
|
|
33
|
-
createDate!: Date;
|
|
34
|
-
updateDate!: Date;
|
|
35
|
-
merchItemId?: string;
|
|
36
|
-
newsArticleId?: string;
|
|
37
|
-
|
|
38
|
-
// UserLikes belongsTo AppUser via appUserId
|
|
39
|
-
appUser!: AppUser;
|
|
40
|
-
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
41
|
-
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
42
|
-
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
43
|
-
// UserLikes belongsTo JukeboxSession via jukeboxId
|
|
44
|
-
jukebox!: JukeboxSession;
|
|
45
|
-
getJukebox!: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
46
|
-
setJukebox!: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
47
|
-
createJukebox!: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
48
|
-
// UserLikes belongsTo MerchItem via merchItemId
|
|
49
|
-
merchItem!: MerchItem;
|
|
50
|
-
getMerchItem!: Sequelize.BelongsToGetAssociationMixin<MerchItem>;
|
|
51
|
-
setMerchItem!: Sequelize.BelongsToSetAssociationMixin<MerchItem, MerchItemId>;
|
|
52
|
-
createMerchItem!: Sequelize.BelongsToCreateAssociationMixin<MerchItem>;
|
|
53
|
-
// UserLikes belongsTo NewsArticle via newsArticleId
|
|
54
|
-
newsArticle!: NewsArticle;
|
|
55
|
-
getNewsArticle!: Sequelize.BelongsToGetAssociationMixin<NewsArticle>;
|
|
56
|
-
setNewsArticle!: Sequelize.BelongsToSetAssociationMixin<NewsArticle, NewsArticleId>;
|
|
57
|
-
createNewsArticle!: Sequelize.BelongsToCreateAssociationMixin<NewsArticle>;
|
|
58
|
-
// UserLikes belongsTo PlatformUserPlaylist via playlistId
|
|
59
|
-
playlist!: PlatformUserPlaylist;
|
|
60
|
-
getPlaylist!: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
61
|
-
setPlaylist!: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
62
|
-
createPlaylist!: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
63
|
-
// UserLikes belongsTo RadioShow via radioShowId
|
|
64
|
-
radioShow!: RadioShow;
|
|
65
|
-
getRadioShow!: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
66
|
-
setRadioShow!: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
67
|
-
createRadioShow!: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
68
|
-
|
|
69
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof UserLikes {
|
|
70
|
-
return UserLikes.init({
|
|
71
|
-
appUserId: {
|
|
72
|
-
type: DataTypes.UUID,
|
|
73
|
-
allowNull: false,
|
|
74
|
-
references: {
|
|
75
|
-
model: 'app_user',
|
|
76
|
-
key: 'id'
|
|
77
|
-
},
|
|
78
|
-
field: 'app_user_id'
|
|
79
|
-
},
|
|
80
|
-
jukeboxId: {
|
|
81
|
-
type: DataTypes.UUID,
|
|
82
|
-
allowNull: true,
|
|
83
|
-
references: {
|
|
84
|
-
model: 'jukebox_session',
|
|
85
|
-
key: 'id'
|
|
86
|
-
},
|
|
87
|
-
field: 'jukebox_id'
|
|
88
|
-
},
|
|
89
|
-
playlistId: {
|
|
90
|
-
type: DataTypes.UUID,
|
|
91
|
-
allowNull: true,
|
|
92
|
-
references: {
|
|
93
|
-
model: 'platform_user_playlist',
|
|
94
|
-
key: 'id'
|
|
95
|
-
},
|
|
96
|
-
field: 'playlist_id'
|
|
97
|
-
},
|
|
98
|
-
radioShowId: {
|
|
99
|
-
type: DataTypes.UUID,
|
|
100
|
-
allowNull: true,
|
|
101
|
-
references: {
|
|
102
|
-
model: 'radio_show',
|
|
103
|
-
key: 'id'
|
|
104
|
-
},
|
|
105
|
-
field: 'radio_show_id'
|
|
106
|
-
},
|
|
107
|
-
id: {
|
|
108
|
-
type: DataTypes.UUID,
|
|
109
|
-
allowNull: false,
|
|
110
|
-
defaultValue: DataTypes.UUIDV4,
|
|
111
|
-
primaryKey: true
|
|
112
|
-
},
|
|
113
|
-
createDate: {
|
|
114
|
-
type: DataTypes.DATE,
|
|
115
|
-
allowNull: false,
|
|
116
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
117
|
-
field: 'create_date'
|
|
118
|
-
},
|
|
119
|
-
updateDate: {
|
|
120
|
-
type: DataTypes.DATE,
|
|
121
|
-
allowNull: false,
|
|
122
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
123
|
-
field: 'update_date'
|
|
124
|
-
},
|
|
125
|
-
merchItemId: {
|
|
126
|
-
type: DataTypes.UUID,
|
|
127
|
-
allowNull: true,
|
|
128
|
-
references: {
|
|
129
|
-
model: 'merch_item',
|
|
130
|
-
key: 'id'
|
|
131
|
-
},
|
|
132
|
-
field: 'merch_item_id'
|
|
133
|
-
},
|
|
134
|
-
newsArticleId: {
|
|
135
|
-
type: DataTypes.UUID,
|
|
136
|
-
allowNull: true,
|
|
137
|
-
references: {
|
|
138
|
-
model: 'news_article',
|
|
139
|
-
key: 'id'
|
|
140
|
-
},
|
|
141
|
-
field: 'news_article_id'
|
|
142
|
-
}
|
|
143
|
-
}, {
|
|
144
|
-
sequelize,
|
|
145
|
-
tableName: 'user_likes',
|
|
146
|
-
schema: 'eb',
|
|
147
|
-
timestamps: false,
|
|
148
|
-
indexes: [
|
|
149
|
-
{
|
|
150
|
-
name: "idx_user_likes_jukebox",
|
|
151
|
-
fields: [
|
|
152
|
-
{ name: "jukebox_id" },
|
|
153
|
-
]
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "idx_user_likes_merch_item",
|
|
157
|
-
fields: [
|
|
158
|
-
{ name: "merch_item_id" },
|
|
159
|
-
]
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: "idx_user_likes_news_article",
|
|
163
|
-
fields: [
|
|
164
|
-
{ name: "news_article_id" },
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: "idx_user_likes_playlist",
|
|
169
|
-
fields: [
|
|
170
|
-
{ name: "playlist_id" },
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
name: "idx_user_likes_radio_show",
|
|
175
|
-
fields: [
|
|
176
|
-
{ name: "radio_show_id" },
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: "idx_user_likes_user",
|
|
181
|
-
fields: [
|
|
182
|
-
{ name: "app_user_id" },
|
|
183
|
-
]
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
name: "uq_user_likes_user_jukebox",
|
|
187
|
-
unique: true,
|
|
188
|
-
fields: [
|
|
189
|
-
{ name: "app_user_id" },
|
|
190
|
-
{ name: "jukebox_id" },
|
|
191
|
-
]
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: "uq_user_likes_user_merch_item",
|
|
195
|
-
unique: true,
|
|
196
|
-
fields: [
|
|
197
|
-
{ name: "app_user_id" },
|
|
198
|
-
{ name: "merch_item_id" },
|
|
199
|
-
]
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: "uq_user_likes_user_news_article",
|
|
203
|
-
unique: true,
|
|
204
|
-
fields: [
|
|
205
|
-
{ name: "app_user_id" },
|
|
206
|
-
{ name: "news_article_id" },
|
|
207
|
-
]
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
name: "uq_user_likes_user_playlist",
|
|
211
|
-
unique: true,
|
|
212
|
-
fields: [
|
|
213
|
-
{ name: "app_user_id" },
|
|
214
|
-
{ name: "playlist_id" },
|
|
215
|
-
]
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: "uq_user_likes_user_radio_show",
|
|
219
|
-
unique: true,
|
|
220
|
-
fields: [
|
|
221
|
-
{ name: "app_user_id" },
|
|
222
|
-
{ name: "radio_show_id" },
|
|
223
|
-
]
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: "user_likes_pkey",
|
|
227
|
-
unique: true,
|
|
228
|
-
fields: [
|
|
229
|
-
{ name: "id" },
|
|
230
|
-
]
|
|
231
|
-
},
|
|
232
|
-
]
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
}
|
package/models/UserMessages.ts
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize';
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
-
import type { UserAbuseReports, UserAbuseReportsId } from './UserAbuseReports';
|
|
5
|
-
|
|
6
|
-
export interface UserMessagesAttributes {
|
|
7
|
-
senderId: string;
|
|
8
|
-
recipientId: string;
|
|
9
|
-
message: string;
|
|
10
|
-
replyMessageId?: string;
|
|
11
|
-
id: string;
|
|
12
|
-
hasBeenRead: boolean;
|
|
13
|
-
hasBeenEdited: boolean;
|
|
14
|
-
hasDeletedBySender: boolean;
|
|
15
|
-
hasDeletedByReceiver: boolean;
|
|
16
|
-
createDate: Date;
|
|
17
|
-
updateDate: Date;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type UserMessagesPk = "id";
|
|
21
|
-
export type UserMessagesId = UserMessages[UserMessagesPk];
|
|
22
|
-
export type UserMessagesOptionalAttributes = "replyMessageId" | "id" | "createDate" | "updateDate";
|
|
23
|
-
export type UserMessagesCreationAttributes = Optional<UserMessagesAttributes, UserMessagesOptionalAttributes>;
|
|
24
|
-
|
|
25
|
-
export class UserMessages extends Model<UserMessagesAttributes, UserMessagesCreationAttributes> implements UserMessagesAttributes {
|
|
26
|
-
senderId!: string;
|
|
27
|
-
recipientId!: string;
|
|
28
|
-
message!: string;
|
|
29
|
-
replyMessageId?: string;
|
|
30
|
-
id!: string;
|
|
31
|
-
hasBeenRead!: boolean;
|
|
32
|
-
hasBeenEdited!: boolean;
|
|
33
|
-
hasDeletedBySender!: boolean;
|
|
34
|
-
hasDeletedByReceiver!: boolean;
|
|
35
|
-
createDate!: Date;
|
|
36
|
-
updateDate!: Date;
|
|
37
|
-
|
|
38
|
-
// UserMessages belongsTo AppUser via recipientId
|
|
39
|
-
recipient!: AppUser;
|
|
40
|
-
getRecipient!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
41
|
-
setRecipient!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
42
|
-
createRecipient!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
43
|
-
// UserMessages belongsTo AppUser via senderId
|
|
44
|
-
sender!: AppUser;
|
|
45
|
-
getSender!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
46
|
-
setSender!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
47
|
-
createSender!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
48
|
-
// UserMessages hasMany UserAbuseReports via directMessageId
|
|
49
|
-
userAbuseReports!: UserAbuseReports[];
|
|
50
|
-
getUserAbuseReports!: Sequelize.HasManyGetAssociationsMixin<UserAbuseReports>;
|
|
51
|
-
setUserAbuseReports!: Sequelize.HasManySetAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
52
|
-
addUserAbuseReport!: Sequelize.HasManyAddAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
53
|
-
addUserAbuseReports!: Sequelize.HasManyAddAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
54
|
-
createUserAbuseReport!: Sequelize.HasManyCreateAssociationMixin<UserAbuseReports>;
|
|
55
|
-
removeUserAbuseReport!: Sequelize.HasManyRemoveAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
56
|
-
removeUserAbuseReports!: Sequelize.HasManyRemoveAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
57
|
-
hasUserAbuseReport!: Sequelize.HasManyHasAssociationMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
58
|
-
hasUserAbuseReports!: Sequelize.HasManyHasAssociationsMixin<UserAbuseReports, UserAbuseReportsId>;
|
|
59
|
-
countUserAbuseReports!: Sequelize.HasManyCountAssociationsMixin;
|
|
60
|
-
// UserMessages belongsTo UserMessages via replyMessageId
|
|
61
|
-
replyMessage!: UserMessages;
|
|
62
|
-
getReplyMessage!: Sequelize.BelongsToGetAssociationMixin<UserMessages>;
|
|
63
|
-
setReplyMessage!: Sequelize.BelongsToSetAssociationMixin<UserMessages, UserMessagesId>;
|
|
64
|
-
createReplyMessage!: Sequelize.BelongsToCreateAssociationMixin<UserMessages>;
|
|
65
|
-
|
|
66
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof UserMessages {
|
|
67
|
-
return UserMessages.init({
|
|
68
|
-
senderId: {
|
|
69
|
-
type: DataTypes.UUID,
|
|
70
|
-
allowNull: false,
|
|
71
|
-
references: {
|
|
72
|
-
model: 'app_user',
|
|
73
|
-
key: 'id'
|
|
74
|
-
},
|
|
75
|
-
field: 'sender_id'
|
|
76
|
-
},
|
|
77
|
-
recipientId: {
|
|
78
|
-
type: DataTypes.UUID,
|
|
79
|
-
allowNull: false,
|
|
80
|
-
references: {
|
|
81
|
-
model: 'app_user',
|
|
82
|
-
key: 'id'
|
|
83
|
-
},
|
|
84
|
-
field: 'recipient_id'
|
|
85
|
-
},
|
|
86
|
-
message: {
|
|
87
|
-
type: DataTypes.STRING(1000),
|
|
88
|
-
allowNull: false
|
|
89
|
-
},
|
|
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
|
-
hasBeenRead: {
|
|
106
|
-
type: DataTypes.BOOLEAN,
|
|
107
|
-
allowNull: false,
|
|
108
|
-
defaultValue: false,
|
|
109
|
-
field: 'has_been_read'
|
|
110
|
-
},
|
|
111
|
-
hasBeenEdited: {
|
|
112
|
-
type: DataTypes.BOOLEAN,
|
|
113
|
-
allowNull: false,
|
|
114
|
-
defaultValue: false,
|
|
115
|
-
field: 'has_been_edited'
|
|
116
|
-
},
|
|
117
|
-
hasDeletedBySender: {
|
|
118
|
-
type: DataTypes.BOOLEAN,
|
|
119
|
-
allowNull: false,
|
|
120
|
-
defaultValue: false,
|
|
121
|
-
field: 'has_deleted_by_sender'
|
|
122
|
-
},
|
|
123
|
-
hasDeletedByReceiver: {
|
|
124
|
-
type: DataTypes.BOOLEAN,
|
|
125
|
-
allowNull: false,
|
|
126
|
-
defaultValue: false,
|
|
127
|
-
field: 'has_deleted_by_receiver'
|
|
128
|
-
},
|
|
129
|
-
createDate: {
|
|
130
|
-
type: DataTypes.DATE,
|
|
131
|
-
allowNull: false,
|
|
132
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
133
|
-
field: 'create_date'
|
|
134
|
-
},
|
|
135
|
-
updateDate: {
|
|
136
|
-
type: DataTypes.DATE,
|
|
137
|
-
allowNull: false,
|
|
138
|
-
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
139
|
-
field: 'update_date'
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
sequelize,
|
|
143
|
-
tableName: 'user_messages',
|
|
144
|
-
schema: 'eb',
|
|
145
|
-
timestamps: false,
|
|
146
|
-
indexes: [
|
|
147
|
-
{
|
|
148
|
-
name: "idx_user_messages_conversation",
|
|
149
|
-
fields: [
|
|
150
|
-
{ name: "sender_id" },
|
|
151
|
-
{ name: "recipient_id" },
|
|
152
|
-
]
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "idx_user_messages_recipient",
|
|
156
|
-
fields: [
|
|
157
|
-
{ name: "recipient_id" },
|
|
158
|
-
]
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
name: "idx_user_messages_reply",
|
|
162
|
-
fields: [
|
|
163
|
-
{ name: "reply_message_id" },
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: "idx_user_messages_sender",
|
|
168
|
-
fields: [
|
|
169
|
-
{ name: "sender_id" },
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: "idx_user_messages_unread",
|
|
174
|
-
fields: [
|
|
175
|
-
{ name: "recipient_id" },
|
|
176
|
-
{ name: "has_been_read" },
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: "user_messages_pkey",
|
|
181
|
-
unique: true,
|
|
182
|
-
fields: [
|
|
183
|
-
{ name: "id" },
|
|
184
|
-
]
|
|
185
|
-
},
|
|
186
|
-
]
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}
|