@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,101 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
|
|
5
|
+
export interface AppUserDeviceAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
appUserId: string;
|
|
8
|
+
devicePlatformId: number;
|
|
9
|
+
endpointArn: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
platformApplicationArn?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type AppUserDevicePk = "id";
|
|
15
|
+
export type AppUserDeviceId = AppUserDevice[AppUserDevicePk];
|
|
16
|
+
export type AppUserDeviceOptionalAttributes = "id" | "createdAt" | "platformApplicationArn";
|
|
17
|
+
export type AppUserDeviceCreationAttributes = Optional<AppUserDeviceAttributes, AppUserDeviceOptionalAttributes>;
|
|
18
|
+
|
|
19
|
+
export class AppUserDevice extends Model<AppUserDeviceAttributes, AppUserDeviceCreationAttributes> implements AppUserDeviceAttributes {
|
|
20
|
+
id!: string;
|
|
21
|
+
appUserId!: string;
|
|
22
|
+
devicePlatformId!: number;
|
|
23
|
+
endpointArn!: string;
|
|
24
|
+
createdAt!: Date;
|
|
25
|
+
platformApplicationArn?: string;
|
|
26
|
+
|
|
27
|
+
// AppUserDevice belongsTo AppUser via appUserId
|
|
28
|
+
appUser!: AppUser;
|
|
29
|
+
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
30
|
+
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
31
|
+
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
32
|
+
|
|
33
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserDevice {
|
|
34
|
+
return AppUserDevice.init({
|
|
35
|
+
id: {
|
|
36
|
+
type: DataTypes.UUID,
|
|
37
|
+
allowNull: false,
|
|
38
|
+
defaultValue: DataTypes.UUIDV4,
|
|
39
|
+
primaryKey: true
|
|
40
|
+
},
|
|
41
|
+
appUserId: {
|
|
42
|
+
type: DataTypes.UUID,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
references: {
|
|
45
|
+
model: 'app_user',
|
|
46
|
+
key: 'id'
|
|
47
|
+
},
|
|
48
|
+
field: 'app_user_id'
|
|
49
|
+
},
|
|
50
|
+
devicePlatformId: {
|
|
51
|
+
type: DataTypes.SMALLINT,
|
|
52
|
+
allowNull: false,
|
|
53
|
+
field: 'device_platform_id'
|
|
54
|
+
},
|
|
55
|
+
endpointArn: {
|
|
56
|
+
type: DataTypes.TEXT,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
unique: "unique_app_user_device_endpoint_arn",
|
|
59
|
+
field: 'endpoint_arn'
|
|
60
|
+
},
|
|
61
|
+
createdAt: {
|
|
62
|
+
type: DataTypes.DATE,
|
|
63
|
+
allowNull: false,
|
|
64
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
65
|
+
field: 'created_at'
|
|
66
|
+
},
|
|
67
|
+
platformApplicationArn: {
|
|
68
|
+
type: DataTypes.TEXT,
|
|
69
|
+
allowNull: true,
|
|
70
|
+
field: 'platform_application_arn'
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
sequelize,
|
|
74
|
+
tableName: 'app_user_device',
|
|
75
|
+
schema: 'eb',
|
|
76
|
+
timestamps: false,
|
|
77
|
+
indexes: [
|
|
78
|
+
{
|
|
79
|
+
name: "app_user_device_pkey",
|
|
80
|
+
unique: true,
|
|
81
|
+
fields: [
|
|
82
|
+
{ name: "id" },
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "idx_app_user_device_user",
|
|
87
|
+
fields: [
|
|
88
|
+
{ name: "app_user_id" },
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "unique_app_user_device_endpoint_arn",
|
|
93
|
+
unique: true,
|
|
94
|
+
fields: [
|
|
95
|
+
{ name: "endpoint_arn" },
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
|
|
4
|
+
export interface AppUserDeviceClassicBackup20260906Attributes {
|
|
5
|
+
id?: string;
|
|
6
|
+
appUserId?: string;
|
|
7
|
+
devicePlatformId?: number;
|
|
8
|
+
endpointArn?: string;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
platformApplicationArn?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type AppUserDeviceClassicBackup20260906Pk = "id";
|
|
14
|
+
export type AppUserDeviceClassicBackup20260906Id = AppUserDeviceClassicBackup20260906[AppUserDeviceClassicBackup20260906Pk];
|
|
15
|
+
export type AppUserDeviceClassicBackup20260906OptionalAttributes = "id" | "appUserId" | "devicePlatformId" | "endpointArn" | "createdAt" | "platformApplicationArn";
|
|
16
|
+
export type AppUserDeviceClassicBackup20260906CreationAttributes = Optional<AppUserDeviceClassicBackup20260906Attributes, AppUserDeviceClassicBackup20260906OptionalAttributes>;
|
|
17
|
+
|
|
18
|
+
export class AppUserDeviceClassicBackup20260906 extends Model<AppUserDeviceClassicBackup20260906Attributes, AppUserDeviceClassicBackup20260906CreationAttributes> implements AppUserDeviceClassicBackup20260906Attributes {
|
|
19
|
+
id?: string;
|
|
20
|
+
appUserId?: string;
|
|
21
|
+
devicePlatformId?: number;
|
|
22
|
+
endpointArn?: string;
|
|
23
|
+
createdAt?: Date;
|
|
24
|
+
platformApplicationArn?: string;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserDeviceClassicBackup20260906 {
|
|
28
|
+
return AppUserDeviceClassicBackup20260906.init({
|
|
29
|
+
id: {
|
|
30
|
+
type: DataTypes.UUID,
|
|
31
|
+
allowNull: true,
|
|
32
|
+
primaryKey: true
|
|
33
|
+
},
|
|
34
|
+
appUserId: {
|
|
35
|
+
type: DataTypes.UUID,
|
|
36
|
+
allowNull: true,
|
|
37
|
+
field: 'app_user_id'
|
|
38
|
+
},
|
|
39
|
+
devicePlatformId: {
|
|
40
|
+
type: DataTypes.SMALLINT,
|
|
41
|
+
allowNull: true,
|
|
42
|
+
field: 'device_platform_id'
|
|
43
|
+
},
|
|
44
|
+
endpointArn: {
|
|
45
|
+
type: DataTypes.TEXT,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
field: 'endpoint_arn'
|
|
48
|
+
},
|
|
49
|
+
createdAt: {
|
|
50
|
+
type: DataTypes.DATE,
|
|
51
|
+
allowNull: true,
|
|
52
|
+
field: 'created_at'
|
|
53
|
+
},
|
|
54
|
+
platformApplicationArn: {
|
|
55
|
+
type: DataTypes.TEXT,
|
|
56
|
+
allowNull: true,
|
|
57
|
+
field: 'platform_application_arn'
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
sequelize,
|
|
61
|
+
tableName: 'app_user_device_classic_backup_20260906',
|
|
62
|
+
schema: 'eb',
|
|
63
|
+
timestamps: false
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
|
|
5
|
+
export interface AppUserFollowRelationAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
appUserId: string;
|
|
8
|
+
followingAppUserId: string;
|
|
9
|
+
stateId: number;
|
|
10
|
+
isBlocked: boolean;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type AppUserFollowRelationPk = "id";
|
|
16
|
+
export type AppUserFollowRelationId = AppUserFollowRelation[AppUserFollowRelationPk];
|
|
17
|
+
export type AppUserFollowRelationOptionalAttributes = "id" | "stateId" | "createdAt" | "updatedAt";
|
|
18
|
+
export type AppUserFollowRelationCreationAttributes = Optional<AppUserFollowRelationAttributes, AppUserFollowRelationOptionalAttributes>;
|
|
19
|
+
|
|
20
|
+
export class AppUserFollowRelation extends Model<AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes> implements AppUserFollowRelationAttributes {
|
|
21
|
+
id!: string;
|
|
22
|
+
appUserId!: string;
|
|
23
|
+
followingAppUserId!: string;
|
|
24
|
+
stateId!: number;
|
|
25
|
+
isBlocked!: boolean;
|
|
26
|
+
createdAt!: Date;
|
|
27
|
+
updatedAt!: Date;
|
|
28
|
+
|
|
29
|
+
// AppUserFollowRelation belongsTo AppUser via appUserId
|
|
30
|
+
appUser!: AppUser;
|
|
31
|
+
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
32
|
+
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
33
|
+
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
34
|
+
// AppUserFollowRelation belongsTo AppUser via followingAppUserId
|
|
35
|
+
followingAppUser!: AppUser;
|
|
36
|
+
getFollowingAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
37
|
+
setFollowingAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
38
|
+
createFollowingAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
39
|
+
|
|
40
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserFollowRelation {
|
|
41
|
+
return AppUserFollowRelation.init({
|
|
42
|
+
id: {
|
|
43
|
+
type: DataTypes.UUID,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
defaultValue: DataTypes.UUIDV4,
|
|
46
|
+
primaryKey: true
|
|
47
|
+
},
|
|
48
|
+
appUserId: {
|
|
49
|
+
type: DataTypes.UUID,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'app_user',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
unique: "unique_app_user_followers",
|
|
56
|
+
field: 'app_user_id'
|
|
57
|
+
},
|
|
58
|
+
followingAppUserId: {
|
|
59
|
+
type: DataTypes.UUID,
|
|
60
|
+
allowNull: false,
|
|
61
|
+
references: {
|
|
62
|
+
model: 'app_user',
|
|
63
|
+
key: 'id'
|
|
64
|
+
},
|
|
65
|
+
unique: "unique_app_user_followers",
|
|
66
|
+
field: 'following_app_user_id'
|
|
67
|
+
},
|
|
68
|
+
stateId: {
|
|
69
|
+
type: DataTypes.SMALLINT,
|
|
70
|
+
allowNull: false,
|
|
71
|
+
defaultValue: 0,
|
|
72
|
+
field: 'state_id'
|
|
73
|
+
},
|
|
74
|
+
isBlocked: {
|
|
75
|
+
type: DataTypes.BOOLEAN,
|
|
76
|
+
allowNull: false,
|
|
77
|
+
defaultValue: false,
|
|
78
|
+
field: 'is_blocked'
|
|
79
|
+
},
|
|
80
|
+
createdAt: {
|
|
81
|
+
type: DataTypes.DATE,
|
|
82
|
+
allowNull: false,
|
|
83
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
84
|
+
field: 'created_at'
|
|
85
|
+
},
|
|
86
|
+
updatedAt: {
|
|
87
|
+
type: DataTypes.DATE,
|
|
88
|
+
allowNull: false,
|
|
89
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
90
|
+
field: 'updated_at'
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
sequelize,
|
|
94
|
+
tableName: 'app_user_follow_relation',
|
|
95
|
+
schema: 'eb',
|
|
96
|
+
timestamps: false,
|
|
97
|
+
indexes: [
|
|
98
|
+
{
|
|
99
|
+
name: "app_user_follow_relation_pkey",
|
|
100
|
+
unique: true,
|
|
101
|
+
fields: [
|
|
102
|
+
{ name: "id" },
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "app_user_id",
|
|
107
|
+
fields: [
|
|
108
|
+
{ name: "app_user_id" },
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "idx_follow_relation_following",
|
|
113
|
+
fields: [
|
|
114
|
+
{ name: "following_app_user_id" },
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "unique_app_user_followers",
|
|
119
|
+
unique: true,
|
|
120
|
+
fields: [
|
|
121
|
+
{ name: "app_user_id" },
|
|
122
|
+
{ name: "following_app_user_id" },
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { Platform, PlatformId } from './Platform';
|
|
5
|
+
|
|
6
|
+
export interface AppUserPlatformRelationAttributes {
|
|
7
|
+
id: string;
|
|
8
|
+
appUserId: string;
|
|
9
|
+
platformId: number;
|
|
10
|
+
externalUserId?: string;
|
|
11
|
+
createDate: Date;
|
|
12
|
+
updateDate: Date;
|
|
13
|
+
accessToken?: string;
|
|
14
|
+
refreshToken?: string;
|
|
15
|
+
expirationDate: Date;
|
|
16
|
+
stateId: number;
|
|
17
|
+
countryCode: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type AppUserPlatformRelationPk = "id";
|
|
21
|
+
export type AppUserPlatformRelationId = AppUserPlatformRelation[AppUserPlatformRelationPk];
|
|
22
|
+
export type AppUserPlatformRelationOptionalAttributes = "id" | "externalUserId" | "createDate" | "updateDate" | "accessToken" | "refreshToken" | "stateId";
|
|
23
|
+
export type AppUserPlatformRelationCreationAttributes = Optional<AppUserPlatformRelationAttributes, AppUserPlatformRelationOptionalAttributes>;
|
|
24
|
+
|
|
25
|
+
export class AppUserPlatformRelation extends Model<AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes> implements AppUserPlatformRelationAttributes {
|
|
26
|
+
id!: string;
|
|
27
|
+
appUserId!: string;
|
|
28
|
+
platformId!: number;
|
|
29
|
+
externalUserId?: string;
|
|
30
|
+
createDate!: Date;
|
|
31
|
+
updateDate!: Date;
|
|
32
|
+
accessToken?: string;
|
|
33
|
+
refreshToken?: string;
|
|
34
|
+
expirationDate!: Date;
|
|
35
|
+
stateId!: number;
|
|
36
|
+
countryCode!: string;
|
|
37
|
+
|
|
38
|
+
// AppUserPlatformRelation belongsTo AppUser via appUserId
|
|
39
|
+
appUser!: AppUser;
|
|
40
|
+
getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
41
|
+
setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
42
|
+
createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
43
|
+
// AppUserPlatformRelation belongsTo Platform via platformId
|
|
44
|
+
platform!: Platform;
|
|
45
|
+
getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
|
|
46
|
+
setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
|
|
47
|
+
createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
|
|
48
|
+
|
|
49
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AppUserPlatformRelation {
|
|
50
|
+
return AppUserPlatformRelation.init({
|
|
51
|
+
id: {
|
|
52
|
+
type: DataTypes.UUID,
|
|
53
|
+
allowNull: false,
|
|
54
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
55
|
+
primaryKey: true
|
|
56
|
+
},
|
|
57
|
+
appUserId: {
|
|
58
|
+
type: DataTypes.UUID,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
references: {
|
|
61
|
+
model: 'app_user',
|
|
62
|
+
key: 'id'
|
|
63
|
+
},
|
|
64
|
+
unique: "uk_platform_relation_app_user_id",
|
|
65
|
+
field: 'app_user_id'
|
|
66
|
+
},
|
|
67
|
+
platformId: {
|
|
68
|
+
type: DataTypes.SMALLINT,
|
|
69
|
+
allowNull: false,
|
|
70
|
+
references: {
|
|
71
|
+
model: 'platform',
|
|
72
|
+
key: 'id'
|
|
73
|
+
},
|
|
74
|
+
field: 'platform_id'
|
|
75
|
+
},
|
|
76
|
+
externalUserId: {
|
|
77
|
+
type: DataTypes.TEXT,
|
|
78
|
+
allowNull: true,
|
|
79
|
+
field: 'external_user_id'
|
|
80
|
+
},
|
|
81
|
+
createDate: {
|
|
82
|
+
type: DataTypes.DATE,
|
|
83
|
+
allowNull: false,
|
|
84
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
85
|
+
field: 'create_date'
|
|
86
|
+
},
|
|
87
|
+
updateDate: {
|
|
88
|
+
type: DataTypes.DATE,
|
|
89
|
+
allowNull: false,
|
|
90
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
91
|
+
field: 'update_date'
|
|
92
|
+
},
|
|
93
|
+
accessToken: {
|
|
94
|
+
type: DataTypes.STRING,
|
|
95
|
+
allowNull: true,
|
|
96
|
+
field: 'access_token'
|
|
97
|
+
},
|
|
98
|
+
refreshToken: {
|
|
99
|
+
type: DataTypes.STRING,
|
|
100
|
+
allowNull: true,
|
|
101
|
+
field: 'refresh_token'
|
|
102
|
+
},
|
|
103
|
+
expirationDate: {
|
|
104
|
+
type: DataTypes.DATE,
|
|
105
|
+
allowNull: false,
|
|
106
|
+
field: 'expiration_date'
|
|
107
|
+
},
|
|
108
|
+
stateId: {
|
|
109
|
+
type: DataTypes.SMALLINT,
|
|
110
|
+
allowNull: false,
|
|
111
|
+
defaultValue: 0,
|
|
112
|
+
field: 'state_id'
|
|
113
|
+
},
|
|
114
|
+
countryCode: {
|
|
115
|
+
type: DataTypes.STRING(2),
|
|
116
|
+
allowNull: false,
|
|
117
|
+
field: 'country_code'
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
sequelize,
|
|
121
|
+
tableName: 'app_user_platform_relation',
|
|
122
|
+
schema: 'eb',
|
|
123
|
+
timestamps: false,
|
|
124
|
+
indexes: [
|
|
125
|
+
{
|
|
126
|
+
name: "app_user_platform_relation_app_user_id_platform_id_idx",
|
|
127
|
+
unique: true,
|
|
128
|
+
fields: [
|
|
129
|
+
{ name: "app_user_id" },
|
|
130
|
+
{ name: "platform_id" },
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "app_user_platform_relation_pkey",
|
|
135
|
+
unique: true,
|
|
136
|
+
fields: [
|
|
137
|
+
{ name: "id" },
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "uk_platform_relation_app_user_id",
|
|
142
|
+
unique: true,
|
|
143
|
+
fields: [
|
|
144
|
+
{ name: "app_user_id" },
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId } from './CanonAlbumExternalReferenceRelation';
|
|
4
|
+
import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
|
|
5
|
+
import type { CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId } from './CanonToPlatformAlbumRelation';
|
|
6
|
+
import type { CanonTrack, CanonTrackId } from './CanonTrack';
|
|
7
|
+
import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
|
|
8
|
+
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
9
|
+
import type { Versus, VersusId } from './Versus';
|
|
10
|
+
import type { VersusOption, VersusOptionId } from './VersusOption';
|
|
11
|
+
|
|
12
|
+
export interface CanonAlbumAttributes {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
asciiName: string;
|
|
16
|
+
releaseDate?: string;
|
|
17
|
+
noOfDisc?: number;
|
|
18
|
+
createDate: Date;
|
|
19
|
+
updateDate: Date;
|
|
20
|
+
hasPhoto?: boolean;
|
|
21
|
+
hasThumbnailPhoto?: boolean;
|
|
22
|
+
description?: string;
|
|
23
|
+
images?: object;
|
|
24
|
+
lastImageHarvestAttempt?: Date;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type CanonAlbumPk = "id";
|
|
28
|
+
export type CanonAlbumId = CanonAlbum[CanonAlbumPk];
|
|
29
|
+
export type CanonAlbumOptionalAttributes = "id" | "releaseDate" | "noOfDisc" | "createDate" | "updateDate" | "hasPhoto" | "hasThumbnailPhoto" | "description" | "images" | "lastImageHarvestAttempt";
|
|
30
|
+
export type CanonAlbumCreationAttributes = Optional<CanonAlbumAttributes, CanonAlbumOptionalAttributes>;
|
|
31
|
+
|
|
32
|
+
export class CanonAlbum extends Model<CanonAlbumAttributes, CanonAlbumCreationAttributes> implements CanonAlbumAttributes {
|
|
33
|
+
id!: string;
|
|
34
|
+
name!: string;
|
|
35
|
+
asciiName!: string;
|
|
36
|
+
releaseDate?: string;
|
|
37
|
+
noOfDisc?: number;
|
|
38
|
+
createDate!: Date;
|
|
39
|
+
updateDate!: Date;
|
|
40
|
+
hasPhoto?: boolean;
|
|
41
|
+
hasThumbnailPhoto?: boolean;
|
|
42
|
+
description?: string;
|
|
43
|
+
images?: object;
|
|
44
|
+
lastImageHarvestAttempt?: Date;
|
|
45
|
+
|
|
46
|
+
// CanonAlbum hasMany CanonAlbumExternalReferenceRelation via canonAlbumId
|
|
47
|
+
canonAlbumExternalReferenceRelations!: CanonAlbumExternalReferenceRelation[];
|
|
48
|
+
getCanonAlbumExternalReferenceRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumExternalReferenceRelation>;
|
|
49
|
+
setCanonAlbumExternalReferenceRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
50
|
+
addCanonAlbumExternalReferenceRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
51
|
+
addCanonAlbumExternalReferenceRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
52
|
+
createCanonAlbumExternalReferenceRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumExternalReferenceRelation>;
|
|
53
|
+
removeCanonAlbumExternalReferenceRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
54
|
+
removeCanonAlbumExternalReferenceRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
55
|
+
hasCanonAlbumExternalReferenceRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
56
|
+
hasCanonAlbumExternalReferenceRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumExternalReferenceRelation, CanonAlbumExternalReferenceRelationId>;
|
|
57
|
+
countCanonAlbumExternalReferenceRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
58
|
+
// CanonAlbum hasMany CanonAlbumTrackRelation via canonAlbumId
|
|
59
|
+
canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
|
|
60
|
+
getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
|
|
61
|
+
setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
62
|
+
addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
63
|
+
addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
64
|
+
createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
|
|
65
|
+
removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
66
|
+
removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
67
|
+
hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
68
|
+
hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
|
|
69
|
+
countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
70
|
+
// CanonAlbum hasMany CanonToPlatformAlbumRelation via canonAlbumId
|
|
71
|
+
canonToPlatformAlbumRelations!: CanonToPlatformAlbumRelation[];
|
|
72
|
+
getCanonToPlatformAlbumRelations!: Sequelize.HasManyGetAssociationsMixin<CanonToPlatformAlbumRelation>;
|
|
73
|
+
setCanonToPlatformAlbumRelations!: Sequelize.HasManySetAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
74
|
+
addCanonToPlatformAlbumRelation!: Sequelize.HasManyAddAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
75
|
+
addCanonToPlatformAlbumRelations!: Sequelize.HasManyAddAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
76
|
+
createCanonToPlatformAlbumRelation!: Sequelize.HasManyCreateAssociationMixin<CanonToPlatformAlbumRelation>;
|
|
77
|
+
removeCanonToPlatformAlbumRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
78
|
+
removeCanonToPlatformAlbumRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
79
|
+
hasCanonToPlatformAlbumRelation!: Sequelize.HasManyHasAssociationMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
80
|
+
hasCanonToPlatformAlbumRelations!: Sequelize.HasManyHasAssociationsMixin<CanonToPlatformAlbumRelation, CanonToPlatformAlbumRelationId>;
|
|
81
|
+
countCanonToPlatformAlbumRelations!: Sequelize.HasManyCountAssociationsMixin;
|
|
82
|
+
// CanonAlbum belongsToMany CanonTrack via canonAlbumId and canonTrackId
|
|
83
|
+
canonTrackIdCanonTracks!: CanonTrack[];
|
|
84
|
+
getCanonTrackIdCanonTracks!: Sequelize.BelongsToManyGetAssociationsMixin<CanonTrack>;
|
|
85
|
+
setCanonTrackIdCanonTracks!: Sequelize.BelongsToManySetAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
86
|
+
addCanonTrackIdCanonTrack!: Sequelize.BelongsToManyAddAssociationMixin<CanonTrack, CanonTrackId>;
|
|
87
|
+
addCanonTrackIdCanonTracks!: Sequelize.BelongsToManyAddAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
88
|
+
createCanonTrackIdCanonTrack!: Sequelize.BelongsToManyCreateAssociationMixin<CanonTrack>;
|
|
89
|
+
removeCanonTrackIdCanonTrack!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonTrack, CanonTrackId>;
|
|
90
|
+
removeCanonTrackIdCanonTracks!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
91
|
+
hasCanonTrackIdCanonTrack!: Sequelize.BelongsToManyHasAssociationMixin<CanonTrack, CanonTrackId>;
|
|
92
|
+
hasCanonTrackIdCanonTracks!: Sequelize.BelongsToManyHasAssociationsMixin<CanonTrack, CanonTrackId>;
|
|
93
|
+
countCanonTrackIdCanonTracks!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
94
|
+
// CanonAlbum belongsToMany ExternalReference via canonAlbumId and externalReferenceId
|
|
95
|
+
externalReferenceIdExternalReferences!: ExternalReference[];
|
|
96
|
+
getExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyGetAssociationsMixin<ExternalReference>;
|
|
97
|
+
setExternalReferenceIdExternalReferences!: Sequelize.BelongsToManySetAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
98
|
+
addExternalReferenceIdExternalReference!: Sequelize.BelongsToManyAddAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
99
|
+
addExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyAddAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
100
|
+
createExternalReferenceIdExternalReference!: Sequelize.BelongsToManyCreateAssociationMixin<ExternalReference>;
|
|
101
|
+
removeExternalReferenceIdExternalReference!: Sequelize.BelongsToManyRemoveAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
102
|
+
removeExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyRemoveAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
103
|
+
hasExternalReferenceIdExternalReference!: Sequelize.BelongsToManyHasAssociationMixin<ExternalReference, ExternalReferenceId>;
|
|
104
|
+
hasExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyHasAssociationsMixin<ExternalReference, ExternalReferenceId>;
|
|
105
|
+
countExternalReferenceIdExternalReferences!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
106
|
+
// CanonAlbum belongsToMany PlatformAlbum via canonAlbumId and platformAlbumId
|
|
107
|
+
platformAlbumIdPlatformAlbums!: PlatformAlbum[];
|
|
108
|
+
getPlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManyGetAssociationsMixin<PlatformAlbum>;
|
|
109
|
+
setPlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
110
|
+
addPlatformAlbumIdPlatformAlbum!: Sequelize.BelongsToManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
111
|
+
addPlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
112
|
+
createPlatformAlbumIdPlatformAlbum!: Sequelize.BelongsToManyCreateAssociationMixin<PlatformAlbum>;
|
|
113
|
+
removePlatformAlbumIdPlatformAlbum!: Sequelize.BelongsToManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
114
|
+
removePlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
115
|
+
hasPlatformAlbumIdPlatformAlbum!: Sequelize.BelongsToManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
|
|
116
|
+
hasPlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
|
|
117
|
+
countPlatformAlbumIdPlatformAlbums!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
118
|
+
// CanonAlbum hasMany Versus via canonAlbumId
|
|
119
|
+
versus!: Versus[];
|
|
120
|
+
getVersus!: Sequelize.HasManyGetAssociationsMixin<Versus>;
|
|
121
|
+
setVersus!: Sequelize.HasManySetAssociationsMixin<Versus, VersusId>;
|
|
122
|
+
addVersu!: Sequelize.HasManyAddAssociationMixin<Versus, VersusId>;
|
|
123
|
+
addVersus!: Sequelize.HasManyAddAssociationsMixin<Versus, VersusId>;
|
|
124
|
+
createVersu!: Sequelize.HasManyCreateAssociationMixin<Versus>;
|
|
125
|
+
removeVersu!: Sequelize.HasManyRemoveAssociationMixin<Versus, VersusId>;
|
|
126
|
+
removeVersus!: Sequelize.HasManyRemoveAssociationsMixin<Versus, VersusId>;
|
|
127
|
+
hasVersu!: Sequelize.HasManyHasAssociationMixin<Versus, VersusId>;
|
|
128
|
+
hasVersus!: Sequelize.HasManyHasAssociationsMixin<Versus, VersusId>;
|
|
129
|
+
countVersus!: Sequelize.HasManyCountAssociationsMixin;
|
|
130
|
+
// CanonAlbum hasMany VersusOption via canonAlbumId
|
|
131
|
+
versusOptions!: VersusOption[];
|
|
132
|
+
getVersusOptions!: Sequelize.HasManyGetAssociationsMixin<VersusOption>;
|
|
133
|
+
setVersusOptions!: Sequelize.HasManySetAssociationsMixin<VersusOption, VersusOptionId>;
|
|
134
|
+
addVersusOption!: Sequelize.HasManyAddAssociationMixin<VersusOption, VersusOptionId>;
|
|
135
|
+
addVersusOptions!: Sequelize.HasManyAddAssociationsMixin<VersusOption, VersusOptionId>;
|
|
136
|
+
createVersusOption!: Sequelize.HasManyCreateAssociationMixin<VersusOption>;
|
|
137
|
+
removeVersusOption!: Sequelize.HasManyRemoveAssociationMixin<VersusOption, VersusOptionId>;
|
|
138
|
+
removeVersusOptions!: Sequelize.HasManyRemoveAssociationsMixin<VersusOption, VersusOptionId>;
|
|
139
|
+
hasVersusOption!: Sequelize.HasManyHasAssociationMixin<VersusOption, VersusOptionId>;
|
|
140
|
+
hasVersusOptions!: Sequelize.HasManyHasAssociationsMixin<VersusOption, VersusOptionId>;
|
|
141
|
+
countVersusOptions!: Sequelize.HasManyCountAssociationsMixin;
|
|
142
|
+
|
|
143
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof CanonAlbum {
|
|
144
|
+
return CanonAlbum.init({
|
|
145
|
+
id: {
|
|
146
|
+
type: DataTypes.UUID,
|
|
147
|
+
allowNull: false,
|
|
148
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
149
|
+
primaryKey: true
|
|
150
|
+
},
|
|
151
|
+
name: {
|
|
152
|
+
type: DataTypes.TEXT,
|
|
153
|
+
allowNull: false
|
|
154
|
+
},
|
|
155
|
+
asciiName: {
|
|
156
|
+
type: DataTypes.TEXT,
|
|
157
|
+
allowNull: false,
|
|
158
|
+
field: 'ascii_name'
|
|
159
|
+
},
|
|
160
|
+
releaseDate: {
|
|
161
|
+
type: DataTypes.TEXT,
|
|
162
|
+
allowNull: true,
|
|
163
|
+
field: 'release_date'
|
|
164
|
+
},
|
|
165
|
+
noOfDisc: {
|
|
166
|
+
type: DataTypes.SMALLINT,
|
|
167
|
+
allowNull: true,
|
|
168
|
+
field: 'no_of_disc'
|
|
169
|
+
},
|
|
170
|
+
createDate: {
|
|
171
|
+
type: DataTypes.DATE,
|
|
172
|
+
allowNull: false,
|
|
173
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
174
|
+
field: 'create_date'
|
|
175
|
+
},
|
|
176
|
+
updateDate: {
|
|
177
|
+
type: DataTypes.DATE,
|
|
178
|
+
allowNull: false,
|
|
179
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
180
|
+
field: 'update_date'
|
|
181
|
+
},
|
|
182
|
+
hasPhoto: {
|
|
183
|
+
type: DataTypes.BOOLEAN,
|
|
184
|
+
allowNull: true,
|
|
185
|
+
defaultValue: false,
|
|
186
|
+
field: 'has_photo'
|
|
187
|
+
},
|
|
188
|
+
hasThumbnailPhoto: {
|
|
189
|
+
type: DataTypes.BOOLEAN,
|
|
190
|
+
allowNull: true,
|
|
191
|
+
defaultValue: false,
|
|
192
|
+
field: 'has_thumbnail_photo'
|
|
193
|
+
},
|
|
194
|
+
description: {
|
|
195
|
+
type: DataTypes.TEXT,
|
|
196
|
+
allowNull: true
|
|
197
|
+
},
|
|
198
|
+
images: {
|
|
199
|
+
type: DataTypes.JSONB,
|
|
200
|
+
allowNull: true
|
|
201
|
+
},
|
|
202
|
+
lastImageHarvestAttempt: {
|
|
203
|
+
type: DataTypes.DATE,
|
|
204
|
+
allowNull: true,
|
|
205
|
+
field: 'last_image_harvest_attempt'
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
sequelize,
|
|
209
|
+
tableName: 'canon_album',
|
|
210
|
+
schema: 'eb',
|
|
211
|
+
timestamps: false,
|
|
212
|
+
indexes: [
|
|
213
|
+
{
|
|
214
|
+
name: "canon_album_pkey",
|
|
215
|
+
unique: true,
|
|
216
|
+
fields: [
|
|
217
|
+
{ name: "id" },
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: "eb_canon_album_last_image_harvest_attempt",
|
|
222
|
+
fields: [
|
|
223
|
+
{ name: "last_image_harvest_attempt" },
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
]
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|