@earbug/db-models 0.0.1
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/.nvmrc +1 -0
- package/dist/AppUser.d.ts +161 -0
- package/dist/AppUser.js +121 -0
- package/dist/AppUserDevice.d.ts +26 -0
- package/dist/AppUserDevice.js +88 -0
- package/dist/AppUserFollowRelation.d.ts +34 -0
- package/dist/AppUserFollowRelation.js +113 -0
- package/dist/AppUserPlatformRelation.d.ts +43 -0
- package/dist/AppUserPlatformRelation.js +132 -0
- package/dist/CanonAlbum.d.ts +119 -0
- package/dist/CanonAlbum.js +117 -0
- package/dist/CanonAlbumExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonAlbumExternalReferenceRelation.js +86 -0
- package/dist/CanonAlbumGenreRelation.d.ts +29 -0
- package/dist/CanonAlbumGenreRelation.js +82 -0
- package/dist/CanonAlbumImageHarvested.d.ts +30 -0
- package/dist/CanonAlbumImageHarvested.js +78 -0
- package/dist/CanonAlbumLabelRelation.d.ts +29 -0
- package/dist/CanonAlbumLabelRelation.js +82 -0
- package/dist/CanonAlbumTrackRelation.d.ts +29 -0
- package/dist/CanonAlbumTrackRelation.js +82 -0
- package/dist/CanonArtist.d.ts +91 -0
- package/dist/CanonArtist.js +114 -0
- package/dist/CanonArtistAlbumRelation.d.ts +29 -0
- package/dist/CanonArtistAlbumRelation.js +82 -0
- package/dist/CanonArtistExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonArtistExternalReferenceRelation.js +86 -0
- package/dist/CanonArtistGenreRelation.d.ts +29 -0
- package/dist/CanonArtistGenreRelation.js +82 -0
- package/dist/CanonArtistImageHarvested.d.ts +30 -0
- package/dist/CanonArtistImageHarvested.js +70 -0
- package/dist/CanonArtistMemberRelation.d.ts +29 -0
- package/dist/CanonArtistMemberRelation.js +82 -0
- package/dist/CanonArtistTrackRelation.d.ts +29 -0
- package/dist/CanonArtistTrackRelation.js +82 -0
- package/dist/CanonGenre.d.ts +133 -0
- package/dist/CanonGenre.js +93 -0
- package/dist/CanonGenreExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonGenreExternalReferenceRelation.js +86 -0
- package/dist/CanonLabel.d.ts +69 -0
- package/dist/CanonLabel.js +83 -0
- package/dist/CanonLabelExternalReferenceRelation.d.ts +31 -0
- package/dist/CanonLabelExternalReferenceRelation.js +86 -0
- package/dist/CanonMember.d.ts +71 -0
- package/dist/CanonMember.js +82 -0
- package/dist/CanonMemberExternalReferenceRelation.d.ts +33 -0
- package/dist/CanonMemberExternalReferenceRelation.js +91 -0
- package/dist/CanonToPlatformAlbumRelation.d.ts +29 -0
- package/dist/CanonToPlatformAlbumRelation.js +82 -0
- package/dist/CanonToPlatformArtistRelation.d.ts +29 -0
- package/dist/CanonToPlatformArtistRelation.js +82 -0
- package/dist/CanonToPlatformGenreRelation.d.ts +29 -0
- package/dist/CanonToPlatformGenreRelation.js +82 -0
- package/dist/CanonToPlatformTrackRelation.d.ts +29 -0
- package/dist/CanonToPlatformTrackRelation.js +82 -0
- package/dist/CanonTrack.d.ts +89 -0
- package/dist/CanonTrack.js +99 -0
- package/dist/ConfigParam.d.ts +19 -0
- package/dist/ConfigParam.js +70 -0
- package/dist/ExternalReference.d.ts +139 -0
- package/dist/ExternalReference.js +79 -0
- package/dist/JukeboxAccessType.d.ts +26 -0
- package/dist/JukeboxAccessType.js +36 -0
- package/dist/JukeboxCanonGenreRelation.d.ts +33 -0
- package/dist/JukeboxCanonGenreRelation.js +101 -0
- package/dist/JukeboxInvite.d.ts +39 -0
- package/dist/JukeboxInvite.js +98 -0
- package/dist/JukeboxQueueEntry.d.ts +74 -0
- package/dist/JukeboxQueueEntry.js +142 -0
- package/dist/JukeboxQueueMode.d.ts +26 -0
- package/dist/JukeboxQueueMode.js +36 -0
- package/dist/JukeboxSession.d.ts +108 -0
- package/dist/JukeboxSession.js +133 -0
- package/dist/JukeboxStatus.d.ts +26 -0
- package/dist/JukeboxStatus.js +34 -0
- package/dist/JukeboxTerminationCondition.d.ts +26 -0
- package/dist/JukeboxTerminationCondition.js +36 -0
- package/dist/JukeboxType.d.ts +26 -0
- package/dist/JukeboxType.js +36 -0
- package/dist/JukeboxUser.d.ts +56 -0
- package/dist/JukeboxUser.js +135 -0
- package/dist/JukeboxUserType.d.ts +26 -0
- package/dist/JukeboxUserType.js +34 -0
- package/dist/KnexMigrations.d.ts +19 -0
- package/dist/KnexMigrations.js +44 -0
- package/dist/KnexMigrationsLock.d.ts +15 -0
- package/dist/KnexMigrationsLock.js +36 -0
- package/dist/MetricsDaily.d.ts +19 -0
- package/dist/MetricsDaily.js +87 -0
- package/dist/MetricsEvent.d.ts +23 -0
- package/dist/MetricsEvent.js +117 -0
- package/dist/NewsSite.d.ts +21 -0
- package/dist/NewsSite.js +57 -0
- package/dist/PauseStatusType.d.ts +26 -0
- package/dist/PauseStatusType.js +34 -0
- package/dist/Platform.d.ts +127 -0
- package/dist/Platform.js +80 -0
- package/dist/PlatformAlbum.d.ts +232 -0
- package/dist/PlatformAlbum.js +123 -0
- package/dist/PlatformAlbumGenreRelation.d.ts +29 -0
- package/dist/PlatformAlbumGenreRelation.js +82 -0
- package/dist/PlatformAlbumTrackRelation.d.ts +29 -0
- package/dist/PlatformAlbumTrackRelation.js +82 -0
- package/dist/PlatformArtist.d.ts +225 -0
- package/dist/PlatformArtist.js +109 -0
- package/dist/PlatformArtistAlbumRelation.d.ts +29 -0
- package/dist/PlatformArtistAlbumRelation.js +82 -0
- package/dist/PlatformArtistGenreRelation.d.ts +29 -0
- package/dist/PlatformArtistGenreRelation.js +82 -0
- package/dist/PlatformArtistTrackRelation.d.ts +29 -0
- package/dist/PlatformArtistTrackRelation.js +82 -0
- package/dist/PlatformGenre.d.ts +122 -0
- package/dist/PlatformGenre.js +90 -0
- package/dist/PlatformTrack.d.ts +183 -0
- package/dist/PlatformTrack.js +129 -0
- package/dist/PlatformTrackGenreRelation.d.ts +29 -0
- package/dist/PlatformTrackGenreRelation.js +82 -0
- package/dist/PlatformUserAlbum.d.ts +54 -0
- package/dist/PlatformUserAlbum.js +121 -0
- package/dist/PlatformUserAlbumTrack.d.ts +42 -0
- package/dist/PlatformUserAlbumTrack.js +121 -0
- package/dist/PlatformUserPlaylist.d.ts +62 -0
- package/dist/PlatformUserPlaylist.js +135 -0
- package/dist/PlatformUserPlaylistTrack.d.ts +48 -0
- package/dist/PlatformUserPlaylistTrack.js +132 -0
- package/dist/PlaybackStatus.d.ts +26 -0
- package/dist/PlaybackStatus.js +36 -0
- package/dist/State.d.ts +50 -0
- package/dist/State.js +36 -0
- package/dist/TrackDeletionReason.d.ts +26 -0
- package/dist/TrackDeletionReason.js +34 -0
- package/dist/UnmatchedAlbum.d.ts +22 -0
- package/dist/UnmatchedAlbum.js +70 -0
- package/dist/UnmatchedArtist.d.ts +26 -0
- package/dist/UnmatchedArtist.js +81 -0
- package/dist/UserContacts.d.ts +46 -0
- package/dist/UserContacts.js +105 -0
- package/dist/init-models.d.ts +209 -0
- package/dist/init-models.js +507 -0
- package/model_options.json +3 -0
- package/models/AppUser.ts +267 -0
- package/models/AppUserDevice.ts +88 -0
- package/models/AppUserFollowRelation.ts +122 -0
- package/models/AppUserPlatformRelation.ts +150 -0
- package/models/CanonAlbum.ts +216 -0
- package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
- package/models/CanonAlbumGenreRelation.ts +86 -0
- package/models/CanonAlbumImageHarvested.ts +106 -0
- package/models/CanonAlbumLabelRelation.ts +86 -0
- package/models/CanonAlbumTrackRelation.ts +86 -0
- package/models/CanonArtist.ts +183 -0
- package/models/CanonArtistAlbumRelation.ts +86 -0
- package/models/CanonArtistExternalReferenceRelation.ts +92 -0
- package/models/CanonArtistGenreRelation.ts +86 -0
- package/models/CanonArtistImageHarvested.ts +98 -0
- package/models/CanonArtistMemberRelation.ts +86 -0
- package/models/CanonArtistTrackRelation.ts +86 -0
- package/models/CanonGenre.ts +208 -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 +86 -0
- package/models/CanonToPlatformArtistRelation.ts +86 -0
- package/models/CanonToPlatformGenreRelation.ts +86 -0
- package/models/CanonToPlatformTrackRelation.ts +86 -0
- package/models/CanonTrack.ts +167 -0
- package/models/ConfigParam.ts +62 -0
- package/models/ExternalReference.ts +201 -0
- package/models/JukeboxAccessType.ts +60 -0
- package/models/JukeboxCanonGenreRelation.ts +109 -0
- package/models/JukeboxInvite.ts +113 -0
- package/models/JukeboxQueueEntry.ts +195 -0
- package/models/JukeboxQueueMode.ts +60 -0
- package/models/JukeboxSession.ts +223 -0
- package/models/JukeboxStatus.ts +58 -0
- package/models/JukeboxTerminationCondition.ts +60 -0
- package/models/JukeboxType.ts +60 -0
- package/models/JukeboxUser.ts +169 -0
- package/models/JukeboxUserType.ts +58 -0
- package/models/KnexMigrations.ts +60 -0
- package/models/KnexMigrationsLock.ts +48 -0
- package/models/MetricsDaily.ts +79 -0
- package/models/MetricsEvent.ts +114 -0
- package/models/NewsSite.ts +75 -0
- package/models/PauseStatusType.ts +58 -0
- package/models/Platform.ts +189 -0
- package/models/PlatformAlbum.ts +345 -0
- package/models/PlatformAlbumGenreRelation.ts +86 -0
- package/models/PlatformAlbumTrackRelation.ts +86 -0
- package/models/PlatformArtist.ts +324 -0
- package/models/PlatformArtistAlbumRelation.ts +86 -0
- package/models/PlatformArtistGenreRelation.ts +86 -0
- package/models/PlatformArtistTrackRelation.ts +86 -0
- package/models/PlatformGenre.ts +194 -0
- package/models/PlatformTrack.ts +298 -0
- package/models/PlatformTrackGenreRelation.ts +86 -0
- package/models/PlatformUserAlbum.ts +152 -0
- package/models/PlatformUserAlbumTrack.ts +139 -0
- package/models/PlatformUserPlaylist.ts +174 -0
- package/models/PlatformUserPlaylistTrack.ts +156 -0
- package/models/PlaybackStatus.ts +60 -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/UserContacts.ts +149 -0
- package/models/init-models.ts +716 -0
- package/package.json +19 -0
- package/tsconfig.json +52 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JukeboxStatus = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class JukeboxStatus extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return JukeboxStatus.init({
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true
|
|
12
|
+
},
|
|
13
|
+
description: {
|
|
14
|
+
type: sequelize_1.DataTypes.STRING(255),
|
|
15
|
+
allowNull: false
|
|
16
|
+
}
|
|
17
|
+
}, {
|
|
18
|
+
sequelize,
|
|
19
|
+
tableName: 'jukebox_status',
|
|
20
|
+
schema: 'eb',
|
|
21
|
+
timestamps: false,
|
|
22
|
+
indexes: [
|
|
23
|
+
{
|
|
24
|
+
name: "jukebox_status_pkey",
|
|
25
|
+
unique: true,
|
|
26
|
+
fields: [
|
|
27
|
+
{ name: "id" },
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.JukeboxStatus = JukeboxStatus;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
4
|
+
export interface JukeboxTerminationConditionAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export type JukeboxTerminationConditionPk = "id";
|
|
9
|
+
export type JukeboxTerminationConditionId = JukeboxTerminationCondition[JukeboxTerminationConditionPk];
|
|
10
|
+
export type JukeboxTerminationConditionCreationAttributes = JukeboxTerminationConditionAttributes;
|
|
11
|
+
export declare class JukeboxTerminationCondition extends Model<JukeboxTerminationConditionAttributes, JukeboxTerminationConditionCreationAttributes> implements JukeboxTerminationConditionAttributes {
|
|
12
|
+
id: number;
|
|
13
|
+
description: string;
|
|
14
|
+
jukeboxSessions: JukeboxSession[];
|
|
15
|
+
getJukeboxSessions: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
|
|
16
|
+
setJukeboxSessions: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
17
|
+
addJukeboxSession: Sequelize.HasManyAddAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
18
|
+
addJukeboxSessions: Sequelize.HasManyAddAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
19
|
+
createJukeboxSession: Sequelize.HasManyCreateAssociationMixin<JukeboxSession>;
|
|
20
|
+
removeJukeboxSession: Sequelize.HasManyRemoveAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
21
|
+
removeJukeboxSessions: Sequelize.HasManyRemoveAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
22
|
+
hasJukeboxSession: Sequelize.HasManyHasAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
23
|
+
hasJukeboxSessions: Sequelize.HasManyHasAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
24
|
+
countJukeboxSessions: Sequelize.HasManyCountAssociationsMixin;
|
|
25
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxTerminationCondition;
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JukeboxTerminationCondition = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class JukeboxTerminationCondition extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return JukeboxTerminationCondition.init({
|
|
8
|
+
id: {
|
|
9
|
+
autoIncrement: true,
|
|
10
|
+
autoIncrementIdentity: true,
|
|
11
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
12
|
+
allowNull: false,
|
|
13
|
+
primaryKey: true
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
17
|
+
allowNull: false
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
sequelize,
|
|
21
|
+
tableName: 'jukebox_termination_condition',
|
|
22
|
+
schema: 'eb',
|
|
23
|
+
timestamps: false,
|
|
24
|
+
indexes: [
|
|
25
|
+
{
|
|
26
|
+
name: "jukebox_termination_condition_pkey",
|
|
27
|
+
unique: true,
|
|
28
|
+
fields: [
|
|
29
|
+
{ name: "id" },
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.JukeboxTerminationCondition = JukeboxTerminationCondition;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
4
|
+
export interface JukeboxTypeAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export type JukeboxTypePk = "id";
|
|
9
|
+
export type JukeboxTypeId = JukeboxType[JukeboxTypePk];
|
|
10
|
+
export type JukeboxTypeCreationAttributes = JukeboxTypeAttributes;
|
|
11
|
+
export declare class JukeboxType extends Model<JukeboxTypeAttributes, JukeboxTypeCreationAttributes> implements JukeboxTypeAttributes {
|
|
12
|
+
id: number;
|
|
13
|
+
description: string;
|
|
14
|
+
jukeboxSessions: JukeboxSession[];
|
|
15
|
+
getJukeboxSessions: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
|
|
16
|
+
setJukeboxSessions: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
17
|
+
addJukeboxSession: Sequelize.HasManyAddAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
18
|
+
addJukeboxSessions: Sequelize.HasManyAddAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
19
|
+
createJukeboxSession: Sequelize.HasManyCreateAssociationMixin<JukeboxSession>;
|
|
20
|
+
removeJukeboxSession: Sequelize.HasManyRemoveAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
21
|
+
removeJukeboxSessions: Sequelize.HasManyRemoveAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
22
|
+
hasJukeboxSession: Sequelize.HasManyHasAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
23
|
+
hasJukeboxSessions: Sequelize.HasManyHasAssociationsMixin<JukeboxSession, JukeboxSessionId>;
|
|
24
|
+
countJukeboxSessions: Sequelize.HasManyCountAssociationsMixin;
|
|
25
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxType;
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JukeboxType = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class JukeboxType extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return JukeboxType.init({
|
|
8
|
+
id: {
|
|
9
|
+
autoIncrement: true,
|
|
10
|
+
autoIncrementIdentity: true,
|
|
11
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
12
|
+
allowNull: false,
|
|
13
|
+
primaryKey: true
|
|
14
|
+
},
|
|
15
|
+
description: {
|
|
16
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
17
|
+
allowNull: false
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
sequelize,
|
|
21
|
+
tableName: 'jukebox_type',
|
|
22
|
+
schema: 'eb',
|
|
23
|
+
timestamps: false,
|
|
24
|
+
indexes: [
|
|
25
|
+
{
|
|
26
|
+
name: "jukebox_type_pkey",
|
|
27
|
+
unique: true,
|
|
28
|
+
fields: [
|
|
29
|
+
{ name: "id" },
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.JukeboxType = JukeboxType;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
5
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
6
|
+
import type { JukeboxUserType, JukeboxUserTypeId } from './JukeboxUserType';
|
|
7
|
+
import type { PauseStatusType, PauseStatusTypeId } from './PauseStatusType';
|
|
8
|
+
export interface JukeboxUserAttributes {
|
|
9
|
+
id: string;
|
|
10
|
+
jukeboxSessionId: string;
|
|
11
|
+
appUserId: string;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
enterDate: Date;
|
|
15
|
+
exitDate?: Date;
|
|
16
|
+
jukeboxUserTypeId: number;
|
|
17
|
+
pauseStatusTypeId: number;
|
|
18
|
+
pausedQueueEntryId?: string;
|
|
19
|
+
}
|
|
20
|
+
export type JukeboxUserPk = "id";
|
|
21
|
+
export type JukeboxUserId = JukeboxUser[JukeboxUserPk];
|
|
22
|
+
export type JukeboxUserOptionalAttributes = "id" | "createdAt" | "updatedAt" | "enterDate" | "exitDate" | "jukeboxUserTypeId" | "pauseStatusTypeId" | "pausedQueueEntryId";
|
|
23
|
+
export type JukeboxUserCreationAttributes = Optional<JukeboxUserAttributes, JukeboxUserOptionalAttributes>;
|
|
24
|
+
export declare class JukeboxUser extends Model<JukeboxUserAttributes, JukeboxUserCreationAttributes> implements JukeboxUserAttributes {
|
|
25
|
+
id: string;
|
|
26
|
+
jukeboxSessionId: string;
|
|
27
|
+
appUserId: string;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
enterDate: Date;
|
|
31
|
+
exitDate?: Date;
|
|
32
|
+
jukeboxUserTypeId: number;
|
|
33
|
+
pauseStatusTypeId: number;
|
|
34
|
+
pausedQueueEntryId?: string;
|
|
35
|
+
appUser: AppUser;
|
|
36
|
+
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
37
|
+
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
38
|
+
createAppUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
39
|
+
pausedQueueEntry: JukeboxQueueEntry;
|
|
40
|
+
getPausedQueueEntry: Sequelize.BelongsToGetAssociationMixin<JukeboxQueueEntry>;
|
|
41
|
+
setPausedQueueEntry: Sequelize.BelongsToSetAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
42
|
+
createPausedQueueEntry: Sequelize.BelongsToCreateAssociationMixin<JukeboxQueueEntry>;
|
|
43
|
+
jukeboxSession: JukeboxSession;
|
|
44
|
+
getJukeboxSession: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
45
|
+
setJukeboxSession: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
46
|
+
createJukeboxSession: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
47
|
+
jukeboxUserType: JukeboxUserType;
|
|
48
|
+
getJukeboxUserType: Sequelize.BelongsToGetAssociationMixin<JukeboxUserType>;
|
|
49
|
+
setJukeboxUserType: Sequelize.BelongsToSetAssociationMixin<JukeboxUserType, JukeboxUserTypeId>;
|
|
50
|
+
createJukeboxUserType: Sequelize.BelongsToCreateAssociationMixin<JukeboxUserType>;
|
|
51
|
+
pauseStatusType: PauseStatusType;
|
|
52
|
+
getPauseStatusType: Sequelize.BelongsToGetAssociationMixin<PauseStatusType>;
|
|
53
|
+
setPauseStatusType: Sequelize.BelongsToSetAssociationMixin<PauseStatusType, PauseStatusTypeId>;
|
|
54
|
+
createPauseStatusType: Sequelize.BelongsToCreateAssociationMixin<PauseStatusType>;
|
|
55
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxUser;
|
|
56
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JukeboxUser = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class JukeboxUser extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return JukeboxUser.init({
|
|
32
|
+
id: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
36
|
+
primaryKey: true
|
|
37
|
+
},
|
|
38
|
+
jukeboxSessionId: {
|
|
39
|
+
type: sequelize_1.DataTypes.UUID,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'jukebox_session',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
unique: "unique_jukebox_user_id",
|
|
46
|
+
field: 'jukebox_session_id'
|
|
47
|
+
},
|
|
48
|
+
appUserId: {
|
|
49
|
+
type: sequelize_1.DataTypes.UUID,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
references: {
|
|
52
|
+
model: 'app_user',
|
|
53
|
+
key: 'id'
|
|
54
|
+
},
|
|
55
|
+
unique: "unique_jukebox_user_id",
|
|
56
|
+
field: 'app_user_id'
|
|
57
|
+
},
|
|
58
|
+
createdAt: {
|
|
59
|
+
type: sequelize_1.DataTypes.DATE,
|
|
60
|
+
allowNull: false,
|
|
61
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
62
|
+
field: 'created_at'
|
|
63
|
+
},
|
|
64
|
+
updatedAt: {
|
|
65
|
+
type: sequelize_1.DataTypes.DATE,
|
|
66
|
+
allowNull: false,
|
|
67
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
68
|
+
field: 'updated_at'
|
|
69
|
+
},
|
|
70
|
+
enterDate: {
|
|
71
|
+
type: sequelize_1.DataTypes.DATE,
|
|
72
|
+
allowNull: false,
|
|
73
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
74
|
+
field: 'enter_date'
|
|
75
|
+
},
|
|
76
|
+
exitDate: {
|
|
77
|
+
type: sequelize_1.DataTypes.DATE,
|
|
78
|
+
allowNull: true,
|
|
79
|
+
field: 'exit_date'
|
|
80
|
+
},
|
|
81
|
+
jukeboxUserTypeId: {
|
|
82
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
83
|
+
allowNull: false,
|
|
84
|
+
defaultValue: 0,
|
|
85
|
+
references: {
|
|
86
|
+
model: 'jukebox_user_type',
|
|
87
|
+
key: 'id'
|
|
88
|
+
},
|
|
89
|
+
field: 'jukebox_user_type_id'
|
|
90
|
+
},
|
|
91
|
+
pauseStatusTypeId: {
|
|
92
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
93
|
+
allowNull: false,
|
|
94
|
+
defaultValue: 0,
|
|
95
|
+
references: {
|
|
96
|
+
model: 'pause_status_type',
|
|
97
|
+
key: 'id'
|
|
98
|
+
},
|
|
99
|
+
field: 'pause_status_type_id'
|
|
100
|
+
},
|
|
101
|
+
pausedQueueEntryId: {
|
|
102
|
+
type: sequelize_1.DataTypes.UUID,
|
|
103
|
+
allowNull: true,
|
|
104
|
+
references: {
|
|
105
|
+
model: 'jukebox_queue_entry',
|
|
106
|
+
key: 'id'
|
|
107
|
+
},
|
|
108
|
+
field: 'paused_queue_entry_id'
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
sequelize,
|
|
112
|
+
tableName: 'jukebox_user',
|
|
113
|
+
schema: 'eb',
|
|
114
|
+
timestamps: false,
|
|
115
|
+
indexes: [
|
|
116
|
+
{
|
|
117
|
+
name: "jukebox_user_pkey",
|
|
118
|
+
unique: true,
|
|
119
|
+
fields: [
|
|
120
|
+
{ name: "id" },
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "unique_jukebox_user_id",
|
|
125
|
+
unique: true,
|
|
126
|
+
fields: [
|
|
127
|
+
{ name: "jukebox_session_id" },
|
|
128
|
+
{ name: "app_user_id" },
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.JukeboxUser = JukeboxUser;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
|
|
4
|
+
export interface JukeboxUserTypeAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export type JukeboxUserTypePk = "id";
|
|
9
|
+
export type JukeboxUserTypeId = JukeboxUserType[JukeboxUserTypePk];
|
|
10
|
+
export type JukeboxUserTypeCreationAttributes = JukeboxUserTypeAttributes;
|
|
11
|
+
export declare class JukeboxUserType extends Model<JukeboxUserTypeAttributes, JukeboxUserTypeCreationAttributes> implements JukeboxUserTypeAttributes {
|
|
12
|
+
id: number;
|
|
13
|
+
description: string;
|
|
14
|
+
jukeboxUsers: JukeboxUser[];
|
|
15
|
+
getJukeboxUsers: Sequelize.HasManyGetAssociationsMixin<JukeboxUser>;
|
|
16
|
+
setJukeboxUsers: Sequelize.HasManySetAssociationsMixin<JukeboxUser, JukeboxUserId>;
|
|
17
|
+
addJukeboxUser: Sequelize.HasManyAddAssociationMixin<JukeboxUser, JukeboxUserId>;
|
|
18
|
+
addJukeboxUsers: Sequelize.HasManyAddAssociationsMixin<JukeboxUser, JukeboxUserId>;
|
|
19
|
+
createJukeboxUser: Sequelize.HasManyCreateAssociationMixin<JukeboxUser>;
|
|
20
|
+
removeJukeboxUser: Sequelize.HasManyRemoveAssociationMixin<JukeboxUser, JukeboxUserId>;
|
|
21
|
+
removeJukeboxUsers: Sequelize.HasManyRemoveAssociationsMixin<JukeboxUser, JukeboxUserId>;
|
|
22
|
+
hasJukeboxUser: Sequelize.HasManyHasAssociationMixin<JukeboxUser, JukeboxUserId>;
|
|
23
|
+
hasJukeboxUsers: Sequelize.HasManyHasAssociationsMixin<JukeboxUser, JukeboxUserId>;
|
|
24
|
+
countJukeboxUsers: Sequelize.HasManyCountAssociationsMixin;
|
|
25
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxUserType;
|
|
26
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JukeboxUserType = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class JukeboxUserType extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return JukeboxUserType.init({
|
|
8
|
+
id: {
|
|
9
|
+
type: sequelize_1.DataTypes.SMALLINT,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true
|
|
12
|
+
},
|
|
13
|
+
description: {
|
|
14
|
+
type: sequelize_1.DataTypes.STRING(255),
|
|
15
|
+
allowNull: false
|
|
16
|
+
}
|
|
17
|
+
}, {
|
|
18
|
+
sequelize,
|
|
19
|
+
tableName: 'jukebox_user_type',
|
|
20
|
+
schema: 'eb',
|
|
21
|
+
timestamps: false,
|
|
22
|
+
indexes: [
|
|
23
|
+
{
|
|
24
|
+
name: "jukebox_user_type_pkey",
|
|
25
|
+
unique: true,
|
|
26
|
+
fields: [
|
|
27
|
+
{ name: "id" },
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.JukeboxUserType = JukeboxUserType;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
export interface KnexMigrationsAttributes {
|
|
4
|
+
id: number;
|
|
5
|
+
name?: string;
|
|
6
|
+
batch?: number;
|
|
7
|
+
migrationTime?: Date;
|
|
8
|
+
}
|
|
9
|
+
export type KnexMigrationsPk = "id";
|
|
10
|
+
export type KnexMigrationsId = KnexMigrations[KnexMigrationsPk];
|
|
11
|
+
export type KnexMigrationsOptionalAttributes = "id" | "name" | "batch" | "migrationTime";
|
|
12
|
+
export type KnexMigrationsCreationAttributes = Optional<KnexMigrationsAttributes, KnexMigrationsOptionalAttributes>;
|
|
13
|
+
export declare class KnexMigrations extends Model<KnexMigrationsAttributes, KnexMigrationsCreationAttributes> implements KnexMigrationsAttributes {
|
|
14
|
+
id: number;
|
|
15
|
+
name?: string;
|
|
16
|
+
batch?: number;
|
|
17
|
+
migrationTime?: Date;
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrations;
|
|
19
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KnexMigrations = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class KnexMigrations extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return KnexMigrations.init({
|
|
8
|
+
id: {
|
|
9
|
+
autoIncrement: true,
|
|
10
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
+
allowNull: false,
|
|
12
|
+
primaryKey: true
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: sequelize_1.DataTypes.STRING(255),
|
|
16
|
+
allowNull: true
|
|
17
|
+
},
|
|
18
|
+
batch: {
|
|
19
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
20
|
+
allowNull: true
|
|
21
|
+
},
|
|
22
|
+
migrationTime: {
|
|
23
|
+
type: sequelize_1.DataTypes.DATE,
|
|
24
|
+
allowNull: true,
|
|
25
|
+
field: 'migration_time'
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
sequelize,
|
|
29
|
+
tableName: 'knex_migrations',
|
|
30
|
+
schema: 'public',
|
|
31
|
+
timestamps: false,
|
|
32
|
+
indexes: [
|
|
33
|
+
{
|
|
34
|
+
name: "knex_migrations_pkey",
|
|
35
|
+
unique: true,
|
|
36
|
+
fields: [
|
|
37
|
+
{ name: "id" },
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.KnexMigrations = KnexMigrations;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
export interface KnexMigrationsLockAttributes {
|
|
4
|
+
index: number;
|
|
5
|
+
isLocked?: number;
|
|
6
|
+
}
|
|
7
|
+
export type KnexMigrationsLockPk = "index";
|
|
8
|
+
export type KnexMigrationsLockId = KnexMigrationsLock[KnexMigrationsLockPk];
|
|
9
|
+
export type KnexMigrationsLockOptionalAttributes = "index" | "isLocked";
|
|
10
|
+
export type KnexMigrationsLockCreationAttributes = Optional<KnexMigrationsLockAttributes, KnexMigrationsLockOptionalAttributes>;
|
|
11
|
+
export declare class KnexMigrationsLock extends Model<KnexMigrationsLockAttributes, KnexMigrationsLockCreationAttributes> implements KnexMigrationsLockAttributes {
|
|
12
|
+
index: number;
|
|
13
|
+
isLocked?: number;
|
|
14
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrationsLock;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KnexMigrationsLock = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class KnexMigrationsLock extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return KnexMigrationsLock.init({
|
|
8
|
+
index: {
|
|
9
|
+
autoIncrement: true,
|
|
10
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
11
|
+
allowNull: false,
|
|
12
|
+
primaryKey: true
|
|
13
|
+
},
|
|
14
|
+
isLocked: {
|
|
15
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
16
|
+
allowNull: true,
|
|
17
|
+
field: 'is_locked'
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
sequelize,
|
|
21
|
+
tableName: 'knex_migrations_lock',
|
|
22
|
+
schema: 'public',
|
|
23
|
+
timestamps: false,
|
|
24
|
+
indexes: [
|
|
25
|
+
{
|
|
26
|
+
name: "knex_migrations_lock_pkey",
|
|
27
|
+
unique: true,
|
|
28
|
+
fields: [
|
|
29
|
+
{ name: "index" },
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.KnexMigrationsLock = KnexMigrationsLock;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
export interface MetricsDailyAttributes {
|
|
4
|
+
day?: string;
|
|
5
|
+
eventType: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
metrics?: object;
|
|
9
|
+
}
|
|
10
|
+
export type MetricsDailyOptionalAttributes = "day" | "createdAt" | "updatedAt" | "metrics";
|
|
11
|
+
export type MetricsDailyCreationAttributes = Optional<MetricsDailyAttributes, MetricsDailyOptionalAttributes>;
|
|
12
|
+
export declare class MetricsDaily extends Model<MetricsDailyAttributes, MetricsDailyCreationAttributes> implements MetricsDailyAttributes {
|
|
13
|
+
day?: string;
|
|
14
|
+
eventType: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
metrics?: object;
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof MetricsDaily;
|
|
19
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.MetricsDaily = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class MetricsDaily extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return MetricsDaily.init({
|
|
32
|
+
day: {
|
|
33
|
+
type: sequelize_1.DataTypes.DATEONLY,
|
|
34
|
+
allowNull: true
|
|
35
|
+
},
|
|
36
|
+
eventType: {
|
|
37
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
38
|
+
allowNull: false,
|
|
39
|
+
field: 'event_type'
|
|
40
|
+
},
|
|
41
|
+
createdAt: {
|
|
42
|
+
type: sequelize_1.DataTypes.DATE,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
45
|
+
field: 'created_at'
|
|
46
|
+
},
|
|
47
|
+
updatedAt: {
|
|
48
|
+
type: sequelize_1.DataTypes.DATE,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
51
|
+
field: 'updated_at'
|
|
52
|
+
},
|
|
53
|
+
metrics: {
|
|
54
|
+
type: sequelize_1.DataTypes.JSONB,
|
|
55
|
+
allowNull: true
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
sequelize,
|
|
59
|
+
tableName: 'metrics_daily',
|
|
60
|
+
schema: 'eb',
|
|
61
|
+
timestamps: false,
|
|
62
|
+
indexes: [
|
|
63
|
+
{
|
|
64
|
+
name: "metrics_daily_day_event_type_unique",
|
|
65
|
+
unique: true,
|
|
66
|
+
fields: [
|
|
67
|
+
{ name: "day" },
|
|
68
|
+
{ name: "event_type" },
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "metrics_daily_event_type_index",
|
|
73
|
+
fields: [
|
|
74
|
+
{ name: "event_type" },
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "metricsdaily_day_idx",
|
|
79
|
+
fields: [
|
|
80
|
+
{ name: "day" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.MetricsDaily = MetricsDaily;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
export interface MetricsEventAttributes {
|
|
4
|
+
eventType: string;
|
|
5
|
+
appUserId: string;
|
|
6
|
+
sessionId: string;
|
|
7
|
+
devicePlatformId: number;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
meta?: object;
|
|
10
|
+
objectId?: string;
|
|
11
|
+
}
|
|
12
|
+
export type MetricsEventOptionalAttributes = "createdAt" | "meta" | "objectId";
|
|
13
|
+
export type MetricsEventCreationAttributes = Optional<MetricsEventAttributes, MetricsEventOptionalAttributes>;
|
|
14
|
+
export declare class MetricsEvent extends Model<MetricsEventAttributes, MetricsEventCreationAttributes> implements MetricsEventAttributes {
|
|
15
|
+
eventType: string;
|
|
16
|
+
appUserId: string;
|
|
17
|
+
sessionId: string;
|
|
18
|
+
devicePlatformId: number;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
meta?: object;
|
|
21
|
+
objectId?: string;
|
|
22
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof MetricsEvent;
|
|
23
|
+
}
|