@earbug/db-models 0.0.9 → 0.0.11
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/AccessControlPreference.d.ts +14 -0
- package/dist/AccessControlPreference.js +42 -0
- package/dist/AppUser.d.ts +15 -1
- package/dist/AppUser.js +6 -0
- package/dist/CanonGenre.d.ts +12 -0
- package/dist/CanonTrack.d.ts +12 -0
- package/dist/PlatformUserPlaylist.d.ts +3 -1
- package/dist/PlatformUserPlaylist.js +6 -0
- package/dist/RadioShow.d.ts +80 -0
- package/dist/RadioShow.js +93 -0
- package/dist/RadioShowGenres.d.ts +29 -0
- package/dist/RadioShowGenres.js +53 -0
- package/dist/RadioShowMedia.d.ts +30 -0
- package/dist/RadioShowMedia.js +89 -0
- package/dist/RadioShowPlacement.d.ts +35 -0
- package/dist/RadioShowPlacement.js +69 -0
- package/dist/RadioShowPublishRequests.d.ts +26 -0
- package/dist/RadioShowPublishRequests.js +80 -0
- package/dist/init-models.d.ts +20 -2
- package/dist/init-models.js +40 -2
- package/models/AccessControlPreference.ts +53 -0
- package/models/AppUser.ts +22 -1
- package/models/CanonGenre.ts +13 -0
- package/models/CanonTrack.ts +13 -0
- package/models/PlatformUserPlaylist.ts +9 -1
- package/models/RadioShow.ts +151 -0
- package/models/RadioShowGenres.ts +81 -0
- package/models/RadioShowMedia.ts +93 -0
- package/models/RadioShowPlacement.ts +103 -0
- package/models/RadioShowPublishRequests.ts +80 -0
- package/models/init-models.ts +56 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioShowPlacement = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class RadioShowPlacement extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return RadioShowPlacement.init({
|
|
8
|
+
radioShowId: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
references: {
|
|
12
|
+
model: 'radio_show',
|
|
13
|
+
key: 'id'
|
|
14
|
+
},
|
|
15
|
+
field: 'radio_show_id'
|
|
16
|
+
},
|
|
17
|
+
canonTrackId: {
|
|
18
|
+
type: sequelize_1.DataTypes.UUID,
|
|
19
|
+
allowNull: true,
|
|
20
|
+
references: {
|
|
21
|
+
model: 'canon_track',
|
|
22
|
+
key: 'id'
|
|
23
|
+
},
|
|
24
|
+
field: 'canon_track_id'
|
|
25
|
+
},
|
|
26
|
+
radioShowMediaId: {
|
|
27
|
+
type: sequelize_1.DataTypes.UUID,
|
|
28
|
+
allowNull: true,
|
|
29
|
+
field: 'radio_show_media_id'
|
|
30
|
+
},
|
|
31
|
+
seqNum: {
|
|
32
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
33
|
+
allowNull: false,
|
|
34
|
+
field: 'seq_num'
|
|
35
|
+
},
|
|
36
|
+
startTime: {
|
|
37
|
+
type: sequelize_1.DataTypes.TIME,
|
|
38
|
+
allowNull: true,
|
|
39
|
+
field: 'start_time'
|
|
40
|
+
},
|
|
41
|
+
endTime: {
|
|
42
|
+
type: sequelize_1.DataTypes.TIME,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
field: 'end_time'
|
|
45
|
+
},
|
|
46
|
+
id: {
|
|
47
|
+
type: sequelize_1.DataTypes.UUID,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
50
|
+
primaryKey: true
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
sequelize,
|
|
54
|
+
tableName: 'radio_show_placement',
|
|
55
|
+
schema: 'eb',
|
|
56
|
+
timestamps: false,
|
|
57
|
+
indexes: [
|
|
58
|
+
{
|
|
59
|
+
name: "radio_show_placement_pkey",
|
|
60
|
+
unique: true,
|
|
61
|
+
fields: [
|
|
62
|
+
{ name: "id" },
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.RadioShowPlacement = RadioShowPlacement;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
4
|
+
export interface RadioShowPublishRequestsAttributes {
|
|
5
|
+
radioShowId: string;
|
|
6
|
+
approved?: boolean;
|
|
7
|
+
id: string;
|
|
8
|
+
createDate: Date;
|
|
9
|
+
updateDate: Date;
|
|
10
|
+
}
|
|
11
|
+
export type RadioShowPublishRequestsPk = "id";
|
|
12
|
+
export type RadioShowPublishRequestsId = RadioShowPublishRequests[RadioShowPublishRequestsPk];
|
|
13
|
+
export type RadioShowPublishRequestsOptionalAttributes = "approved" | "id" | "createDate" | "updateDate";
|
|
14
|
+
export type RadioShowPublishRequestsCreationAttributes = Optional<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsOptionalAttributes>;
|
|
15
|
+
export declare class RadioShowPublishRequests extends Model<RadioShowPublishRequestsAttributes, RadioShowPublishRequestsCreationAttributes> implements RadioShowPublishRequestsAttributes {
|
|
16
|
+
radioShowId: string;
|
|
17
|
+
approved?: boolean;
|
|
18
|
+
id: string;
|
|
19
|
+
createDate: Date;
|
|
20
|
+
updateDate: Date;
|
|
21
|
+
radioShow: RadioShow;
|
|
22
|
+
getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
23
|
+
setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
24
|
+
createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
25
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPublishRequests;
|
|
26
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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.RadioShowPublishRequests = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class RadioShowPublishRequests extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return RadioShowPublishRequests.init({
|
|
32
|
+
radioShowId: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
references: {
|
|
36
|
+
model: 'radio_show',
|
|
37
|
+
key: 'id'
|
|
38
|
+
},
|
|
39
|
+
field: 'radio_show_id'
|
|
40
|
+
},
|
|
41
|
+
approved: {
|
|
42
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
43
|
+
allowNull: true
|
|
44
|
+
},
|
|
45
|
+
id: {
|
|
46
|
+
type: sequelize_1.DataTypes.UUID,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
49
|
+
primaryKey: true
|
|
50
|
+
},
|
|
51
|
+
createDate: {
|
|
52
|
+
type: sequelize_1.DataTypes.DATE,
|
|
53
|
+
allowNull: false,
|
|
54
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
55
|
+
field: 'create_date'
|
|
56
|
+
},
|
|
57
|
+
updateDate: {
|
|
58
|
+
type: sequelize_1.DataTypes.DATE,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
61
|
+
field: 'update_date'
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
sequelize,
|
|
65
|
+
tableName: 'radio_show_publish_requests',
|
|
66
|
+
schema: 'eb',
|
|
67
|
+
timestamps: false,
|
|
68
|
+
indexes: [
|
|
69
|
+
{
|
|
70
|
+
name: "radio_show_publish_requests_pkey",
|
|
71
|
+
unique: true,
|
|
72
|
+
fields: [
|
|
73
|
+
{ name: "id" },
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.RadioShowPublishRequests = RadioShowPublishRequests;
|
package/dist/init-models.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Sequelize } from "sequelize";
|
|
2
|
+
import { AccessControlPreference as _AccessControlPreference } from "./AccessControlPreference";
|
|
3
|
+
import type { AccessControlPreferenceAttributes, AccessControlPreferenceCreationAttributes } from "./AccessControlPreference";
|
|
2
4
|
import { AppUser as _AppUser } from "./AppUser";
|
|
3
5
|
import type { AppUserAttributes, AppUserCreationAttributes } from "./AppUser";
|
|
4
6
|
import { AppUserDevice as _AppUserDevice } from "./AppUserDevice";
|
|
@@ -131,6 +133,16 @@ import { PlaybackStatus as _PlaybackStatus } from "./PlaybackStatus";
|
|
|
131
133
|
import type { PlaybackStatusAttributes, PlaybackStatusCreationAttributes } from "./PlaybackStatus";
|
|
132
134
|
import { PlaybackStatusType as _PlaybackStatusType } from "./PlaybackStatusType";
|
|
133
135
|
import type { PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes } from "./PlaybackStatusType";
|
|
136
|
+
import { RadioShow as _RadioShow } from "./RadioShow";
|
|
137
|
+
import type { RadioShowAttributes, RadioShowCreationAttributes } from "./RadioShow";
|
|
138
|
+
import { RadioShowGenres as _RadioShowGenres } from "./RadioShowGenres";
|
|
139
|
+
import type { RadioShowGenresAttributes, RadioShowGenresCreationAttributes } from "./RadioShowGenres";
|
|
140
|
+
import { RadioShowMedia as _RadioShowMedia } from "./RadioShowMedia";
|
|
141
|
+
import type { RadioShowMediaAttributes, RadioShowMediaCreationAttributes } from "./RadioShowMedia";
|
|
142
|
+
import { RadioShowPlacement as _RadioShowPlacement } from "./RadioShowPlacement";
|
|
143
|
+
import type { RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes } from "./RadioShowPlacement";
|
|
144
|
+
import { RadioShowPublishRequests as _RadioShowPublishRequests } from "./RadioShowPublishRequests";
|
|
145
|
+
import type { RadioShowPublishRequestsAttributes, RadioShowPublishRequestsCreationAttributes } from "./RadioShowPublishRequests";
|
|
134
146
|
import { State as _State } from "./State";
|
|
135
147
|
import type { StateAttributes, StateCreationAttributes } from "./State";
|
|
136
148
|
import { TrackDeletionReason as _TrackDeletionReason } from "./TrackDeletionReason";
|
|
@@ -141,9 +153,10 @@ import { UnmatchedArtist as _UnmatchedArtist } from "./UnmatchedArtist";
|
|
|
141
153
|
import type { UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes } from "./UnmatchedArtist";
|
|
142
154
|
import { UserContacts as _UserContacts } from "./UserContacts";
|
|
143
155
|
import type { UserContactsAttributes, UserContactsCreationAttributes } from "./UserContacts";
|
|
144
|
-
export { _AppUser as AppUser, _AppUserDevice as AppUserDevice, _AppUserFollowRelation as AppUserFollowRelation, _AppUserPlatformRelation as AppUserPlatformRelation, _CanonAlbum as CanonAlbum, _CanonAlbumExternalReferenceRelation as CanonAlbumExternalReferenceRelation, _CanonAlbumGenreRelation as CanonAlbumGenreRelation, _CanonAlbumImageHarvested as CanonAlbumImageHarvested, _CanonAlbumLabelRelation as CanonAlbumLabelRelation, _CanonAlbumTrackRelation as CanonAlbumTrackRelation, _CanonArtist as CanonArtist, _CanonArtistAlbumRelation as CanonArtistAlbumRelation, _CanonArtistExternalReferenceRelation as CanonArtistExternalReferenceRelation, _CanonArtistGenreRelation as CanonArtistGenreRelation, _CanonArtistImageHarvested as CanonArtistImageHarvested, _CanonArtistMemberRelation as CanonArtistMemberRelation, _CanonArtistTrackRelation as CanonArtistTrackRelation, _CanonGenre as CanonGenre, _CanonGenreExternalReferenceRelation as CanonGenreExternalReferenceRelation, _CanonLabel as CanonLabel, _CanonLabelExternalReferenceRelation as CanonLabelExternalReferenceRelation, _CanonMember as CanonMember, _CanonMemberExternalReferenceRelation as CanonMemberExternalReferenceRelation, _CanonToPlatformAlbumRelation as CanonToPlatformAlbumRelation, _CanonToPlatformArtistRelation as CanonToPlatformArtistRelation, _CanonToPlatformGenreRelation as CanonToPlatformGenreRelation, _CanonToPlatformTrackRelation as CanonToPlatformTrackRelation, _CanonTrack as CanonTrack, _ConfigParam as ConfigParam, _ExternalReference as ExternalReference, _JukeboxAccessType as JukeboxAccessType, _JukeboxCanonGenreRelation as JukeboxCanonGenreRelation, _JukeboxInvite as JukeboxInvite, _JukeboxQueueEntry as JukeboxQueueEntry, _JukeboxQueueMode as JukeboxQueueMode, _JukeboxSession as JukeboxSession, _JukeboxStatus as JukeboxStatus, _JukeboxTerminationCondition as JukeboxTerminationCondition, _JukeboxType as JukeboxType, _JukeboxUser as JukeboxUser, _JukeboxUserType as JukeboxUserType, _KnexMigrations as KnexMigrations, _KnexMigrationsLock as KnexMigrationsLock, _MetricsDaily as MetricsDaily, _MetricsEvent as MetricsEvent, _NewsSite as NewsSite, _Notification as Notification, _NotificationType as NotificationType, _PauseStatusType as PauseStatusType, _Platform as Platform, _PlatformAlbum as PlatformAlbum, _PlatformAlbumGenreRelation as PlatformAlbumGenreRelation, _PlatformAlbumTrackRelation as PlatformAlbumTrackRelation, _PlatformArtist as PlatformArtist, _PlatformArtistAlbumRelation as PlatformArtistAlbumRelation, _PlatformArtistGenreRelation as PlatformArtistGenreRelation, _PlatformArtistTrackRelation as PlatformArtistTrackRelation, _PlatformGenre as PlatformGenre, _PlatformTrack as PlatformTrack, _PlatformTrackGenreRelation as PlatformTrackGenreRelation, _PlatformUserAlbum as PlatformUserAlbum, _PlatformUserAlbumTrack as PlatformUserAlbumTrack, _PlatformUserPlaylist as PlatformUserPlaylist, _PlatformUserPlaylistTrack as PlatformUserPlaylistTrack, _PlaybackStatus as PlaybackStatus, _PlaybackStatusType as PlaybackStatusType, _State as State, _TrackDeletionReason as TrackDeletionReason, _UnmatchedAlbum as UnmatchedAlbum, _UnmatchedArtist as UnmatchedArtist, _UserContacts as UserContacts, };
|
|
145
|
-
export type { AppUserAttributes, AppUserCreationAttributes, AppUserDeviceAttributes, AppUserDeviceCreationAttributes, AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes, AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes, CanonAlbumAttributes, CanonAlbumCreationAttributes, CanonAlbumExternalReferenceRelationAttributes, CanonAlbumExternalReferenceRelationCreationAttributes, CanonAlbumGenreRelationAttributes, CanonAlbumGenreRelationCreationAttributes, CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedCreationAttributes, CanonAlbumLabelRelationAttributes, CanonAlbumLabelRelationCreationAttributes, CanonAlbumTrackRelationAttributes, CanonAlbumTrackRelationCreationAttributes, CanonArtistAttributes, CanonArtistCreationAttributes, CanonArtistAlbumRelationAttributes, CanonArtistAlbumRelationCreationAttributes, CanonArtistExternalReferenceRelationAttributes, CanonArtistExternalReferenceRelationCreationAttributes, CanonArtistGenreRelationAttributes, CanonArtistGenreRelationCreationAttributes, CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedCreationAttributes, CanonArtistMemberRelationAttributes, CanonArtistMemberRelationCreationAttributes, CanonArtistTrackRelationAttributes, CanonArtistTrackRelationCreationAttributes, CanonGenreAttributes, CanonGenreCreationAttributes, CanonGenreExternalReferenceRelationAttributes, CanonGenreExternalReferenceRelationCreationAttributes, CanonLabelAttributes, CanonLabelCreationAttributes, CanonLabelExternalReferenceRelationAttributes, CanonLabelExternalReferenceRelationCreationAttributes, CanonMemberAttributes, CanonMemberCreationAttributes, CanonMemberExternalReferenceRelationAttributes, CanonMemberExternalReferenceRelationCreationAttributes, CanonToPlatformAlbumRelationAttributes, CanonToPlatformAlbumRelationCreationAttributes, CanonToPlatformArtistRelationAttributes, CanonToPlatformArtistRelationCreationAttributes, CanonToPlatformGenreRelationAttributes, CanonToPlatformGenreRelationCreationAttributes, CanonToPlatformTrackRelationAttributes, CanonToPlatformTrackRelationCreationAttributes, CanonTrackAttributes, CanonTrackCreationAttributes, ConfigParamAttributes, ConfigParamCreationAttributes, ExternalReferenceAttributes, ExternalReferenceCreationAttributes, JukeboxAccessTypeAttributes, JukeboxAccessTypeCreationAttributes, JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationCreationAttributes, JukeboxInviteAttributes, JukeboxInviteCreationAttributes, JukeboxQueueEntryAttributes, JukeboxQueueEntryCreationAttributes, JukeboxQueueModeAttributes, JukeboxQueueModeCreationAttributes, JukeboxSessionAttributes, JukeboxSessionCreationAttributes, JukeboxStatusAttributes, JukeboxStatusCreationAttributes, JukeboxTerminationConditionAttributes, JukeboxTerminationConditionCreationAttributes, JukeboxTypeAttributes, JukeboxTypeCreationAttributes, JukeboxUserAttributes, JukeboxUserCreationAttributes, JukeboxUserTypeAttributes, JukeboxUserTypeCreationAttributes, KnexMigrationsAttributes, KnexMigrationsCreationAttributes, KnexMigrationsLockAttributes, KnexMigrationsLockCreationAttributes, MetricsDailyAttributes, MetricsDailyCreationAttributes, MetricsEventAttributes, MetricsEventCreationAttributes, NewsSiteAttributes, NewsSiteCreationAttributes, NotificationAttributes, NotificationCreationAttributes, NotificationTypeAttributes, NotificationTypeCreationAttributes, PauseStatusTypeAttributes, PauseStatusTypeCreationAttributes, PlatformAttributes, PlatformCreationAttributes, PlatformAlbumAttributes, PlatformAlbumCreationAttributes, PlatformAlbumGenreRelationAttributes, PlatformAlbumGenreRelationCreationAttributes, PlatformAlbumTrackRelationAttributes, PlatformAlbumTrackRelationCreationAttributes, PlatformArtistAttributes, PlatformArtistCreationAttributes, PlatformArtistAlbumRelationAttributes, PlatformArtistAlbumRelationCreationAttributes, PlatformArtistGenreRelationAttributes, PlatformArtistGenreRelationCreationAttributes, PlatformArtistTrackRelationAttributes, PlatformArtistTrackRelationCreationAttributes, PlatformGenreAttributes, PlatformGenreCreationAttributes, PlatformTrackAttributes, PlatformTrackCreationAttributes, PlatformTrackGenreRelationAttributes, PlatformTrackGenreRelationCreationAttributes, PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes, PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes, PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes, PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes, PlaybackStatusAttributes, PlaybackStatusCreationAttributes, PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes, StateAttributes, StateCreationAttributes, TrackDeletionReasonAttributes, TrackDeletionReasonCreationAttributes, UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes, UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes, UserContactsAttributes, UserContactsCreationAttributes, };
|
|
156
|
+
export { _AccessControlPreference as AccessControlPreference, _AppUser as AppUser, _AppUserDevice as AppUserDevice, _AppUserFollowRelation as AppUserFollowRelation, _AppUserPlatformRelation as AppUserPlatformRelation, _CanonAlbum as CanonAlbum, _CanonAlbumExternalReferenceRelation as CanonAlbumExternalReferenceRelation, _CanonAlbumGenreRelation as CanonAlbumGenreRelation, _CanonAlbumImageHarvested as CanonAlbumImageHarvested, _CanonAlbumLabelRelation as CanonAlbumLabelRelation, _CanonAlbumTrackRelation as CanonAlbumTrackRelation, _CanonArtist as CanonArtist, _CanonArtistAlbumRelation as CanonArtistAlbumRelation, _CanonArtistExternalReferenceRelation as CanonArtistExternalReferenceRelation, _CanonArtistGenreRelation as CanonArtistGenreRelation, _CanonArtistImageHarvested as CanonArtistImageHarvested, _CanonArtistMemberRelation as CanonArtistMemberRelation, _CanonArtistTrackRelation as CanonArtistTrackRelation, _CanonGenre as CanonGenre, _CanonGenreExternalReferenceRelation as CanonGenreExternalReferenceRelation, _CanonLabel as CanonLabel, _CanonLabelExternalReferenceRelation as CanonLabelExternalReferenceRelation, _CanonMember as CanonMember, _CanonMemberExternalReferenceRelation as CanonMemberExternalReferenceRelation, _CanonToPlatformAlbumRelation as CanonToPlatformAlbumRelation, _CanonToPlatformArtistRelation as CanonToPlatformArtistRelation, _CanonToPlatformGenreRelation as CanonToPlatformGenreRelation, _CanonToPlatformTrackRelation as CanonToPlatformTrackRelation, _CanonTrack as CanonTrack, _ConfigParam as ConfigParam, _ExternalReference as ExternalReference, _JukeboxAccessType as JukeboxAccessType, _JukeboxCanonGenreRelation as JukeboxCanonGenreRelation, _JukeboxInvite as JukeboxInvite, _JukeboxQueueEntry as JukeboxQueueEntry, _JukeboxQueueMode as JukeboxQueueMode, _JukeboxSession as JukeboxSession, _JukeboxStatus as JukeboxStatus, _JukeboxTerminationCondition as JukeboxTerminationCondition, _JukeboxType as JukeboxType, _JukeboxUser as JukeboxUser, _JukeboxUserType as JukeboxUserType, _KnexMigrations as KnexMigrations, _KnexMigrationsLock as KnexMigrationsLock, _MetricsDaily as MetricsDaily, _MetricsEvent as MetricsEvent, _NewsSite as NewsSite, _Notification as Notification, _NotificationType as NotificationType, _PauseStatusType as PauseStatusType, _Platform as Platform, _PlatformAlbum as PlatformAlbum, _PlatformAlbumGenreRelation as PlatformAlbumGenreRelation, _PlatformAlbumTrackRelation as PlatformAlbumTrackRelation, _PlatformArtist as PlatformArtist, _PlatformArtistAlbumRelation as PlatformArtistAlbumRelation, _PlatformArtistGenreRelation as PlatformArtistGenreRelation, _PlatformArtistTrackRelation as PlatformArtistTrackRelation, _PlatformGenre as PlatformGenre, _PlatformTrack as PlatformTrack, _PlatformTrackGenreRelation as PlatformTrackGenreRelation, _PlatformUserAlbum as PlatformUserAlbum, _PlatformUserAlbumTrack as PlatformUserAlbumTrack, _PlatformUserPlaylist as PlatformUserPlaylist, _PlatformUserPlaylistTrack as PlatformUserPlaylistTrack, _PlaybackStatus as PlaybackStatus, _PlaybackStatusType as PlaybackStatusType, _RadioShow as RadioShow, _RadioShowGenres as RadioShowGenres, _RadioShowMedia as RadioShowMedia, _RadioShowPlacement as RadioShowPlacement, _RadioShowPublishRequests as RadioShowPublishRequests, _State as State, _TrackDeletionReason as TrackDeletionReason, _UnmatchedAlbum as UnmatchedAlbum, _UnmatchedArtist as UnmatchedArtist, _UserContacts as UserContacts, };
|
|
157
|
+
export type { AccessControlPreferenceAttributes, AccessControlPreferenceCreationAttributes, AppUserAttributes, AppUserCreationAttributes, AppUserDeviceAttributes, AppUserDeviceCreationAttributes, AppUserFollowRelationAttributes, AppUserFollowRelationCreationAttributes, AppUserPlatformRelationAttributes, AppUserPlatformRelationCreationAttributes, CanonAlbumAttributes, CanonAlbumCreationAttributes, CanonAlbumExternalReferenceRelationAttributes, CanonAlbumExternalReferenceRelationCreationAttributes, CanonAlbumGenreRelationAttributes, CanonAlbumGenreRelationCreationAttributes, CanonAlbumImageHarvestedAttributes, CanonAlbumImageHarvestedCreationAttributes, CanonAlbumLabelRelationAttributes, CanonAlbumLabelRelationCreationAttributes, CanonAlbumTrackRelationAttributes, CanonAlbumTrackRelationCreationAttributes, CanonArtistAttributes, CanonArtistCreationAttributes, CanonArtistAlbumRelationAttributes, CanonArtistAlbumRelationCreationAttributes, CanonArtistExternalReferenceRelationAttributes, CanonArtistExternalReferenceRelationCreationAttributes, CanonArtistGenreRelationAttributes, CanonArtistGenreRelationCreationAttributes, CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedCreationAttributes, CanonArtistMemberRelationAttributes, CanonArtistMemberRelationCreationAttributes, CanonArtistTrackRelationAttributes, CanonArtistTrackRelationCreationAttributes, CanonGenreAttributes, CanonGenreCreationAttributes, CanonGenreExternalReferenceRelationAttributes, CanonGenreExternalReferenceRelationCreationAttributes, CanonLabelAttributes, CanonLabelCreationAttributes, CanonLabelExternalReferenceRelationAttributes, CanonLabelExternalReferenceRelationCreationAttributes, CanonMemberAttributes, CanonMemberCreationAttributes, CanonMemberExternalReferenceRelationAttributes, CanonMemberExternalReferenceRelationCreationAttributes, CanonToPlatformAlbumRelationAttributes, CanonToPlatformAlbumRelationCreationAttributes, CanonToPlatformArtistRelationAttributes, CanonToPlatformArtistRelationCreationAttributes, CanonToPlatformGenreRelationAttributes, CanonToPlatformGenreRelationCreationAttributes, CanonToPlatformTrackRelationAttributes, CanonToPlatformTrackRelationCreationAttributes, CanonTrackAttributes, CanonTrackCreationAttributes, ConfigParamAttributes, ConfigParamCreationAttributes, ExternalReferenceAttributes, ExternalReferenceCreationAttributes, JukeboxAccessTypeAttributes, JukeboxAccessTypeCreationAttributes, JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationCreationAttributes, JukeboxInviteAttributes, JukeboxInviteCreationAttributes, JukeboxQueueEntryAttributes, JukeboxQueueEntryCreationAttributes, JukeboxQueueModeAttributes, JukeboxQueueModeCreationAttributes, JukeboxSessionAttributes, JukeboxSessionCreationAttributes, JukeboxStatusAttributes, JukeboxStatusCreationAttributes, JukeboxTerminationConditionAttributes, JukeboxTerminationConditionCreationAttributes, JukeboxTypeAttributes, JukeboxTypeCreationAttributes, JukeboxUserAttributes, JukeboxUserCreationAttributes, JukeboxUserTypeAttributes, JukeboxUserTypeCreationAttributes, KnexMigrationsAttributes, KnexMigrationsCreationAttributes, KnexMigrationsLockAttributes, KnexMigrationsLockCreationAttributes, MetricsDailyAttributes, MetricsDailyCreationAttributes, MetricsEventAttributes, MetricsEventCreationAttributes, NewsSiteAttributes, NewsSiteCreationAttributes, NotificationAttributes, NotificationCreationAttributes, NotificationTypeAttributes, NotificationTypeCreationAttributes, PauseStatusTypeAttributes, PauseStatusTypeCreationAttributes, PlatformAttributes, PlatformCreationAttributes, PlatformAlbumAttributes, PlatformAlbumCreationAttributes, PlatformAlbumGenreRelationAttributes, PlatformAlbumGenreRelationCreationAttributes, PlatformAlbumTrackRelationAttributes, PlatformAlbumTrackRelationCreationAttributes, PlatformArtistAttributes, PlatformArtistCreationAttributes, PlatformArtistAlbumRelationAttributes, PlatformArtistAlbumRelationCreationAttributes, PlatformArtistGenreRelationAttributes, PlatformArtistGenreRelationCreationAttributes, PlatformArtistTrackRelationAttributes, PlatformArtistTrackRelationCreationAttributes, PlatformGenreAttributes, PlatformGenreCreationAttributes, PlatformTrackAttributes, PlatformTrackCreationAttributes, PlatformTrackGenreRelationAttributes, PlatformTrackGenreRelationCreationAttributes, PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes, PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes, PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes, PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes, PlaybackStatusAttributes, PlaybackStatusCreationAttributes, PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes, RadioShowAttributes, RadioShowCreationAttributes, RadioShowGenresAttributes, RadioShowGenresCreationAttributes, RadioShowMediaAttributes, RadioShowMediaCreationAttributes, RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes, RadioShowPublishRequestsAttributes, RadioShowPublishRequestsCreationAttributes, StateAttributes, StateCreationAttributes, TrackDeletionReasonAttributes, TrackDeletionReasonCreationAttributes, UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes, UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes, UserContactsAttributes, UserContactsCreationAttributes, };
|
|
146
158
|
export declare function initModels(sequelize: Sequelize): {
|
|
159
|
+
AccessControlPreference: typeof _AccessControlPreference;
|
|
147
160
|
AppUser: typeof _AppUser;
|
|
148
161
|
AppUserDevice: typeof _AppUserDevice;
|
|
149
162
|
AppUserFollowRelation: typeof _AppUserFollowRelation;
|
|
@@ -210,6 +223,11 @@ export declare function initModels(sequelize: Sequelize): {
|
|
|
210
223
|
PlatformUserPlaylistTrack: typeof _PlatformUserPlaylistTrack;
|
|
211
224
|
PlaybackStatus: typeof _PlaybackStatus;
|
|
212
225
|
PlaybackStatusType: typeof _PlaybackStatusType;
|
|
226
|
+
RadioShow: typeof _RadioShow;
|
|
227
|
+
RadioShowGenres: typeof _RadioShowGenres;
|
|
228
|
+
RadioShowMedia: typeof _RadioShowMedia;
|
|
229
|
+
RadioShowPlacement: typeof _RadioShowPlacement;
|
|
230
|
+
RadioShowPublishRequests: typeof _RadioShowPublishRequests;
|
|
213
231
|
State: typeof _State;
|
|
214
232
|
TrackDeletionReason: typeof _TrackDeletionReason;
|
|
215
233
|
UnmatchedAlbum: typeof _UnmatchedAlbum;
|
package/dist/init-models.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.UserContacts = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = exports.PlaybackStatusType = exports.PlaybackStatus = exports.PlatformUserPlaylistTrack = exports.PlatformUserPlaylist = exports.PlatformUserAlbumTrack = exports.PlatformUserAlbum = exports.PlatformTrackGenreRelation = exports.PlatformTrack = exports.PlatformGenre = exports.PlatformArtistTrackRelation = exports.PlatformArtistGenreRelation = exports.PlatformArtistAlbumRelation = exports.PlatformArtist = exports.PlatformAlbumTrackRelation = exports.PlatformAlbumGenreRelation = exports.PlatformAlbum = void 0;
|
|
3
|
+
exports.PauseStatusType = exports.NotificationType = exports.Notification = exports.NewsSite = exports.MetricsEvent = exports.MetricsDaily = exports.KnexMigrationsLock = exports.KnexMigrations = exports.JukeboxUserType = exports.JukeboxUser = exports.JukeboxType = exports.JukeboxTerminationCondition = exports.JukeboxStatus = exports.JukeboxSession = exports.JukeboxQueueMode = exports.JukeboxQueueEntry = exports.JukeboxInvite = exports.JukeboxCanonGenreRelation = exports.JukeboxAccessType = exports.ExternalReference = exports.ConfigParam = exports.CanonTrack = exports.CanonToPlatformTrackRelation = exports.CanonToPlatformGenreRelation = exports.CanonToPlatformArtistRelation = exports.CanonToPlatformAlbumRelation = exports.CanonMemberExternalReferenceRelation = exports.CanonMember = exports.CanonLabelExternalReferenceRelation = exports.CanonLabel = exports.CanonGenreExternalReferenceRelation = exports.CanonGenre = exports.CanonArtistTrackRelation = exports.CanonArtistMemberRelation = exports.CanonArtistImageHarvested = exports.CanonArtistGenreRelation = exports.CanonArtistExternalReferenceRelation = exports.CanonArtistAlbumRelation = exports.CanonArtist = exports.CanonAlbumTrackRelation = exports.CanonAlbumLabelRelation = exports.CanonAlbumImageHarvested = exports.CanonAlbumGenreRelation = exports.CanonAlbumExternalReferenceRelation = exports.CanonAlbum = exports.AppUserPlatformRelation = exports.AppUserFollowRelation = exports.AppUserDevice = exports.AppUser = exports.AccessControlPreference = void 0;
|
|
4
|
+
exports.UserContacts = exports.UnmatchedArtist = exports.UnmatchedAlbum = exports.TrackDeletionReason = exports.State = exports.RadioShowPublishRequests = exports.RadioShowPlacement = exports.RadioShowMedia = exports.RadioShowGenres = exports.RadioShow = exports.PlaybackStatusType = exports.PlaybackStatus = exports.PlatformUserPlaylistTrack = exports.PlatformUserPlaylist = exports.PlatformUserAlbumTrack = exports.PlatformUserAlbum = exports.PlatformTrackGenreRelation = exports.PlatformTrack = exports.PlatformGenre = exports.PlatformArtistTrackRelation = exports.PlatformArtistGenreRelation = exports.PlatformArtistAlbumRelation = exports.PlatformArtist = exports.PlatformAlbumTrackRelation = exports.PlatformAlbumGenreRelation = exports.PlatformAlbum = exports.Platform = void 0;
|
|
5
5
|
exports.initModels = initModels;
|
|
6
|
+
const AccessControlPreference_1 = require("./AccessControlPreference");
|
|
7
|
+
Object.defineProperty(exports, "AccessControlPreference", { enumerable: true, get: function () { return AccessControlPreference_1.AccessControlPreference; } });
|
|
6
8
|
const AppUser_1 = require("./AppUser");
|
|
7
9
|
Object.defineProperty(exports, "AppUser", { enumerable: true, get: function () { return AppUser_1.AppUser; } });
|
|
8
10
|
const AppUserDevice_1 = require("./AppUserDevice");
|
|
@@ -135,6 +137,16 @@ const PlaybackStatus_1 = require("./PlaybackStatus");
|
|
|
135
137
|
Object.defineProperty(exports, "PlaybackStatus", { enumerable: true, get: function () { return PlaybackStatus_1.PlaybackStatus; } });
|
|
136
138
|
const PlaybackStatusType_1 = require("./PlaybackStatusType");
|
|
137
139
|
Object.defineProperty(exports, "PlaybackStatusType", { enumerable: true, get: function () { return PlaybackStatusType_1.PlaybackStatusType; } });
|
|
140
|
+
const RadioShow_1 = require("./RadioShow");
|
|
141
|
+
Object.defineProperty(exports, "RadioShow", { enumerable: true, get: function () { return RadioShow_1.RadioShow; } });
|
|
142
|
+
const RadioShowGenres_1 = require("./RadioShowGenres");
|
|
143
|
+
Object.defineProperty(exports, "RadioShowGenres", { enumerable: true, get: function () { return RadioShowGenres_1.RadioShowGenres; } });
|
|
144
|
+
const RadioShowMedia_1 = require("./RadioShowMedia");
|
|
145
|
+
Object.defineProperty(exports, "RadioShowMedia", { enumerable: true, get: function () { return RadioShowMedia_1.RadioShowMedia; } });
|
|
146
|
+
const RadioShowPlacement_1 = require("./RadioShowPlacement");
|
|
147
|
+
Object.defineProperty(exports, "RadioShowPlacement", { enumerable: true, get: function () { return RadioShowPlacement_1.RadioShowPlacement; } });
|
|
148
|
+
const RadioShowPublishRequests_1 = require("./RadioShowPublishRequests");
|
|
149
|
+
Object.defineProperty(exports, "RadioShowPublishRequests", { enumerable: true, get: function () { return RadioShowPublishRequests_1.RadioShowPublishRequests; } });
|
|
138
150
|
const State_1 = require("./State");
|
|
139
151
|
Object.defineProperty(exports, "State", { enumerable: true, get: function () { return State_1.State; } });
|
|
140
152
|
const TrackDeletionReason_1 = require("./TrackDeletionReason");
|
|
@@ -146,6 +158,7 @@ Object.defineProperty(exports, "UnmatchedArtist", { enumerable: true, get: funct
|
|
|
146
158
|
const UserContacts_1 = require("./UserContacts");
|
|
147
159
|
Object.defineProperty(exports, "UserContacts", { enumerable: true, get: function () { return UserContacts_1.UserContacts; } });
|
|
148
160
|
function initModels(sequelize) {
|
|
161
|
+
const AccessControlPreference = AccessControlPreference_1.AccessControlPreference.initModel(sequelize);
|
|
149
162
|
const AppUser = AppUser_1.AppUser.initModel(sequelize);
|
|
150
163
|
const AppUserDevice = AppUserDevice_1.AppUserDevice.initModel(sequelize);
|
|
151
164
|
const AppUserFollowRelation = AppUserFollowRelation_1.AppUserFollowRelation.initModel(sequelize);
|
|
@@ -212,6 +225,11 @@ function initModels(sequelize) {
|
|
|
212
225
|
const PlatformUserPlaylistTrack = PlatformUserPlaylistTrack_1.PlatformUserPlaylistTrack.initModel(sequelize);
|
|
213
226
|
const PlaybackStatus = PlaybackStatus_1.PlaybackStatus.initModel(sequelize);
|
|
214
227
|
const PlaybackStatusType = PlaybackStatusType_1.PlaybackStatusType.initModel(sequelize);
|
|
228
|
+
const RadioShow = RadioShow_1.RadioShow.initModel(sequelize);
|
|
229
|
+
const RadioShowGenres = RadioShowGenres_1.RadioShowGenres.initModel(sequelize);
|
|
230
|
+
const RadioShowMedia = RadioShowMedia_1.RadioShowMedia.initModel(sequelize);
|
|
231
|
+
const RadioShowPlacement = RadioShowPlacement_1.RadioShowPlacement.initModel(sequelize);
|
|
232
|
+
const RadioShowPublishRequests = RadioShowPublishRequests_1.RadioShowPublishRequests.initModel(sequelize);
|
|
215
233
|
const State = State_1.State.initModel(sequelize);
|
|
216
234
|
const TrackDeletionReason = TrackDeletionReason_1.TrackDeletionReason.initModel(sequelize);
|
|
217
235
|
const UnmatchedAlbum = UnmatchedAlbum_1.UnmatchedAlbum.initModel(sequelize);
|
|
@@ -285,6 +303,8 @@ function initModels(sequelize) {
|
|
|
285
303
|
AppUser.hasMany(PlatformUserAlbum, { as: "platformUserAlbums", foreignKey: "appUserId" });
|
|
286
304
|
PlatformUserPlaylist.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
287
305
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId" });
|
|
306
|
+
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId" });
|
|
307
|
+
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId" });
|
|
288
308
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
289
309
|
AppUser.hasMany(UserContacts, { as: "userContacts", foreignKey: "appUserId" });
|
|
290
310
|
CanonAlbumExternalReferenceRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
@@ -313,6 +333,8 @@ function initModels(sequelize) {
|
|
|
313
333
|
CanonGenre.hasMany(CanonToPlatformGenreRelation, { as: "canonToPlatformGenreRelations", foreignKey: "canonGenreId" });
|
|
314
334
|
JukeboxCanonGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
315
335
|
CanonGenre.hasMany(JukeboxCanonGenreRelation, { as: "jukeboxCanonGenreRelations", foreignKey: "canonGenreId" });
|
|
336
|
+
RadioShowGenres.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
337
|
+
CanonGenre.hasMany(RadioShowGenres, { as: "radioShowGenres", foreignKey: "canonGenreId" });
|
|
316
338
|
CanonAlbumLabelRelation.belongsTo(CanonLabel, { as: "canonLabel", foreignKey: "canonLabelId" });
|
|
317
339
|
CanonLabel.hasMany(CanonAlbumLabelRelation, { as: "canonAlbumLabelRelations", foreignKey: "canonLabelId" });
|
|
318
340
|
CanonLabelExternalReferenceRelation.belongsTo(CanonLabel, { as: "canonLabel", foreignKey: "canonLabelId" });
|
|
@@ -329,6 +351,8 @@ function initModels(sequelize) {
|
|
|
329
351
|
CanonTrack.hasMany(CanonToPlatformTrackRelation, { as: "canonToPlatformTrackRelations", foreignKey: "canonTrackId" });
|
|
330
352
|
JukeboxQueueEntry.belongsTo(CanonTrack, { as: "track", foreignKey: "trackId" });
|
|
331
353
|
CanonTrack.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackId" });
|
|
354
|
+
RadioShowPlacement.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
355
|
+
CanonTrack.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "canonTrackId" });
|
|
332
356
|
CanonAlbumExternalReferenceRelation.belongsTo(ExternalReference, { as: "externalReference", foreignKey: "externalReferenceId" });
|
|
333
357
|
ExternalReference.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "externalReferenceId" });
|
|
334
358
|
CanonArtistExternalReferenceRelation.belongsTo(ExternalReference, { as: "externalReference", foreignKey: "externalReferenceId" });
|
|
@@ -443,6 +467,14 @@ function initModels(sequelize) {
|
|
|
443
467
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
444
468
|
JukeboxQueueEntry.belongsTo(PlaybackStatusType, { as: "playbackStatusType", foreignKey: "playbackStatusTypeId" });
|
|
445
469
|
PlaybackStatusType.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "playbackStatusTypeId" });
|
|
470
|
+
RadioShowGenres.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
471
|
+
RadioShow.hasMany(RadioShowGenres, { as: "radioShowGenres", foreignKey: "radioShowId" });
|
|
472
|
+
RadioShowMedia.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
473
|
+
RadioShow.hasMany(RadioShowMedia, { as: "radioShowMedia", foreignKey: "radioShowId" });
|
|
474
|
+
RadioShowPlacement.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
475
|
+
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId" });
|
|
476
|
+
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
477
|
+
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId" });
|
|
446
478
|
AppUser.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
447
479
|
State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId" });
|
|
448
480
|
PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
@@ -452,6 +484,7 @@ function initModels(sequelize) {
|
|
|
452
484
|
JukeboxQueueEntry.belongsTo(TrackDeletionReason, { as: "trackDeletionReason", foreignKey: "trackDeletionReasonId" });
|
|
453
485
|
TrackDeletionReason.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackDeletionReasonId" });
|
|
454
486
|
return {
|
|
487
|
+
AccessControlPreference: AccessControlPreference,
|
|
455
488
|
AppUser: AppUser,
|
|
456
489
|
AppUserDevice: AppUserDevice,
|
|
457
490
|
AppUserFollowRelation: AppUserFollowRelation,
|
|
@@ -518,6 +551,11 @@ function initModels(sequelize) {
|
|
|
518
551
|
PlatformUserPlaylistTrack: PlatformUserPlaylistTrack,
|
|
519
552
|
PlaybackStatus: PlaybackStatus,
|
|
520
553
|
PlaybackStatusType: PlaybackStatusType,
|
|
554
|
+
RadioShow: RadioShow,
|
|
555
|
+
RadioShowGenres: RadioShowGenres,
|
|
556
|
+
RadioShowMedia: RadioShowMedia,
|
|
557
|
+
RadioShowPlacement: RadioShowPlacement,
|
|
558
|
+
RadioShowPublishRequests: RadioShowPublishRequests,
|
|
521
559
|
State: State,
|
|
522
560
|
TrackDeletionReason: TrackDeletionReason,
|
|
523
561
|
UnmatchedAlbum: UnmatchedAlbum,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
|
|
4
|
+
export interface AccessControlPreferenceAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type AccessControlPreferencePk = "id";
|
|
10
|
+
export type AccessControlPreferenceId = AccessControlPreference[AccessControlPreferencePk];
|
|
11
|
+
export type AccessControlPreferenceCreationAttributes = AccessControlPreferenceAttributes;
|
|
12
|
+
|
|
13
|
+
export class AccessControlPreference extends Model<AccessControlPreferenceAttributes, AccessControlPreferenceCreationAttributes> implements AccessControlPreferenceAttributes {
|
|
14
|
+
id!: number;
|
|
15
|
+
name!: string;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AccessControlPreference {
|
|
19
|
+
return AccessControlPreference.init({
|
|
20
|
+
id: {
|
|
21
|
+
type: DataTypes.SMALLINT,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
primaryKey: true
|
|
24
|
+
},
|
|
25
|
+
name: {
|
|
26
|
+
type: DataTypes.TEXT,
|
|
27
|
+
allowNull: false,
|
|
28
|
+
unique: "access_control_preference_name_unique"
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
sequelize,
|
|
32
|
+
tableName: 'access_control_preference',
|
|
33
|
+
schema: 'eb',
|
|
34
|
+
timestamps: false,
|
|
35
|
+
indexes: [
|
|
36
|
+
{
|
|
37
|
+
name: "access_control_preference_name_unique",
|
|
38
|
+
unique: true,
|
|
39
|
+
fields: [
|
|
40
|
+
{ name: "name" },
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "access_control_preference_pkey",
|
|
45
|
+
unique: true,
|
|
46
|
+
fields: [
|
|
47
|
+
{ name: "id" },
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
package/models/AppUser.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
|
|
|
9
9
|
import type { Notification, NotificationId } from './Notification';
|
|
10
10
|
import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
|
|
11
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
12
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
12
13
|
import type { State, StateId } from './State';
|
|
13
14
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
14
15
|
|
|
@@ -24,11 +25,12 @@ export interface AppUserAttributes {
|
|
|
24
25
|
autoApproveFollowers: boolean;
|
|
25
26
|
lastHarvested?: Date;
|
|
26
27
|
lastHarvestedError?: string;
|
|
28
|
+
earbugAccessControlPreference: string;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export type AppUserPk = "id";
|
|
30
32
|
export type AppUserId = AppUser[AppUserPk];
|
|
31
|
-
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError";
|
|
33
|
+
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError" | "earbugAccessControlPreference";
|
|
32
34
|
export type AppUserCreationAttributes = Optional<AppUserAttributes, AppUserOptionalAttributes>;
|
|
33
35
|
|
|
34
36
|
export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes> implements AppUserAttributes {
|
|
@@ -43,6 +45,7 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
43
45
|
autoApproveFollowers!: boolean;
|
|
44
46
|
lastHarvested?: Date;
|
|
45
47
|
lastHarvestedError?: string;
|
|
48
|
+
earbugAccessControlPreference!: string;
|
|
46
49
|
|
|
47
50
|
// AppUser hasMany AppUserDevice via appUserId
|
|
48
51
|
appUserDevices!: AppUserDevice[];
|
|
@@ -181,6 +184,18 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
181
184
|
hasPlatformUserPlaylist!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
182
185
|
hasPlatformUserPlaylists!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
183
186
|
countPlatformUserPlaylists!: Sequelize.HasManyCountAssociationsMixin;
|
|
187
|
+
// AppUser hasMany RadioShow via creatorUserId
|
|
188
|
+
radioShows!: RadioShow[];
|
|
189
|
+
getRadioShows!: Sequelize.HasManyGetAssociationsMixin<RadioShow>;
|
|
190
|
+
setRadioShows!: Sequelize.HasManySetAssociationsMixin<RadioShow, RadioShowId>;
|
|
191
|
+
addRadioShow!: Sequelize.HasManyAddAssociationMixin<RadioShow, RadioShowId>;
|
|
192
|
+
addRadioShows!: Sequelize.HasManyAddAssociationsMixin<RadioShow, RadioShowId>;
|
|
193
|
+
createRadioShow!: Sequelize.HasManyCreateAssociationMixin<RadioShow>;
|
|
194
|
+
removeRadioShow!: Sequelize.HasManyRemoveAssociationMixin<RadioShow, RadioShowId>;
|
|
195
|
+
removeRadioShows!: Sequelize.HasManyRemoveAssociationsMixin<RadioShow, RadioShowId>;
|
|
196
|
+
hasRadioShow!: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
|
|
197
|
+
hasRadioShows!: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
|
|
198
|
+
countRadioShows!: Sequelize.HasManyCountAssociationsMixin;
|
|
184
199
|
// AppUser hasMany UserContacts via appUserId
|
|
185
200
|
userContacts!: UserContacts[];
|
|
186
201
|
getUserContacts!: Sequelize.HasManyGetAssociationsMixin<UserContacts>;
|
|
@@ -265,6 +280,12 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
265
280
|
type: DataTypes.STRING(512),
|
|
266
281
|
allowNull: true,
|
|
267
282
|
field: 'last_harvested_error'
|
|
283
|
+
},
|
|
284
|
+
earbugAccessControlPreference: {
|
|
285
|
+
type: DataTypes.TEXT,
|
|
286
|
+
allowNull: false,
|
|
287
|
+
defaultValue: "PUBLIC",
|
|
288
|
+
field: 'earbug_access_control_preference'
|
|
268
289
|
}
|
|
269
290
|
}, {
|
|
270
291
|
sequelize,
|
package/models/CanonGenre.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId } from './J
|
|
|
9
9
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
10
10
|
import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
|
|
11
11
|
import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
|
|
12
|
+
import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
|
|
12
13
|
|
|
13
14
|
export interface CanonGenreAttributes {
|
|
14
15
|
name: string;
|
|
@@ -142,6 +143,18 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
|
|
|
142
143
|
hasPlatformGenreIdPlatformGenre!: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
|
|
143
144
|
hasPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
|
|
144
145
|
countPlatformGenreIdPlatformGenres!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
146
|
+
// CanonGenre hasMany RadioShowGenres via canonGenreId
|
|
147
|
+
radioShowGenres!: RadioShowGenres[];
|
|
148
|
+
getRadioShowGenres!: Sequelize.HasManyGetAssociationsMixin<RadioShowGenres>;
|
|
149
|
+
setRadioShowGenres!: Sequelize.HasManySetAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
|
|
150
|
+
addRadioShowGenre!: Sequelize.HasManyAddAssociationMixin<RadioShowGenres, RadioShowGenresId>;
|
|
151
|
+
addRadioShowGenres!: Sequelize.HasManyAddAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
|
|
152
|
+
createRadioShowGenre!: Sequelize.HasManyCreateAssociationMixin<RadioShowGenres>;
|
|
153
|
+
removeRadioShowGenre!: Sequelize.HasManyRemoveAssociationMixin<RadioShowGenres, RadioShowGenresId>;
|
|
154
|
+
removeRadioShowGenres!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
|
|
155
|
+
hasRadioShowGenre!: Sequelize.HasManyHasAssociationMixin<RadioShowGenres, RadioShowGenresId>;
|
|
156
|
+
hasRadioShowGenres!: Sequelize.HasManyHasAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
|
|
157
|
+
countRadioShowGenres!: Sequelize.HasManyCountAssociationsMixin;
|
|
145
158
|
|
|
146
159
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenre {
|
|
147
160
|
return CanonGenre.init({
|
package/models/CanonTrack.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { CanonArtistTrackRelation, CanonArtistTrackRelationId } from './Can
|
|
|
7
7
|
import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
|
|
8
8
|
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
9
9
|
import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
10
|
+
import type { RadioShowPlacement, RadioShowPlacementId } from './RadioShowPlacement';
|
|
10
11
|
|
|
11
12
|
export interface CanonTrackAttributes {
|
|
12
13
|
name: string;
|
|
@@ -120,6 +121,18 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
|
|
|
120
121
|
hasPlatformTrackIdPlatformTrack!: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
121
122
|
hasPlatformTrackIdPlatformTracks!: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
|
|
122
123
|
countPlatformTrackIdPlatformTracks!: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
124
|
+
// CanonTrack hasMany RadioShowPlacement via canonTrackId
|
|
125
|
+
radioShowPlacements!: RadioShowPlacement[];
|
|
126
|
+
getRadioShowPlacements!: Sequelize.HasManyGetAssociationsMixin<RadioShowPlacement>;
|
|
127
|
+
setRadioShowPlacements!: Sequelize.HasManySetAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
128
|
+
addRadioShowPlacement!: Sequelize.HasManyAddAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
129
|
+
addRadioShowPlacements!: Sequelize.HasManyAddAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
130
|
+
createRadioShowPlacement!: Sequelize.HasManyCreateAssociationMixin<RadioShowPlacement>;
|
|
131
|
+
removeRadioShowPlacement!: Sequelize.HasManyRemoveAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
132
|
+
removeRadioShowPlacements!: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
133
|
+
hasRadioShowPlacement!: Sequelize.HasManyHasAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
134
|
+
hasRadioShowPlacements!: Sequelize.HasManyHasAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
|
|
135
|
+
countRadioShowPlacements!: Sequelize.HasManyCountAssociationsMixin;
|
|
123
136
|
|
|
124
137
|
static initModel(sequelize: Sequelize.Sequelize): typeof CanonTrack {
|
|
125
138
|
return CanonTrack.init({
|
|
@@ -18,11 +18,12 @@ export interface PlatformUserPlaylistAttributes {
|
|
|
18
18
|
createDate: Date;
|
|
19
19
|
updateDate: Date;
|
|
20
20
|
stateId: number;
|
|
21
|
+
earbugAccessControlPreference: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export type PlatformUserPlaylistPk = "id";
|
|
24
25
|
export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
|
|
25
|
-
export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId";
|
|
26
|
+
export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId" | "earbugAccessControlPreference";
|
|
26
27
|
export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
|
|
27
28
|
|
|
28
29
|
export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
|
|
@@ -38,6 +39,7 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
38
39
|
createDate!: Date;
|
|
39
40
|
updateDate!: Date;
|
|
40
41
|
stateId!: number;
|
|
42
|
+
earbugAccessControlPreference!: string;
|
|
41
43
|
|
|
42
44
|
// PlatformUserPlaylist belongsTo AppUser via appUserId
|
|
43
45
|
appUser!: AppUser;
|
|
@@ -145,6 +147,12 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
145
147
|
key: 'id'
|
|
146
148
|
},
|
|
147
149
|
field: 'state_id'
|
|
150
|
+
},
|
|
151
|
+
earbugAccessControlPreference: {
|
|
152
|
+
type: DataTypes.TEXT,
|
|
153
|
+
allowNull: false,
|
|
154
|
+
defaultValue: "PRIVATE",
|
|
155
|
+
field: 'earbug_access_control_preference'
|
|
148
156
|
}
|
|
149
157
|
}, {
|
|
150
158
|
sequelize,
|