@earbug/db-models 0.0.13 → 0.0.15
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/CanonArtist.d.ts +5 -1
- package/dist/CanonArtist.js +10 -0
- package/dist/NewsArticle.d.ts +41 -0
- package/dist/NewsArticle.js +109 -0
- package/dist/NewsPlatform.d.ts +31 -0
- package/dist/NewsPlatform.js +71 -0
- package/dist/init-models.d.ts +8 -2
- package/dist/init-models.js +14 -2
- package/models/CanonArtist.ts +15 -1
- package/models/NewsArticle.ts +126 -0
- package/models/NewsPlatform.ts +77 -0
- package/models/init-models.ts +18 -0
- package/package.json +1 -1
package/dist/CanonArtist.d.ts
CHANGED
|
@@ -18,10 +18,12 @@ export interface CanonArtistAttributes {
|
|
|
18
18
|
hasThumbnailPhoto?: boolean;
|
|
19
19
|
images?: object;
|
|
20
20
|
lastImageHarvestAttempt?: Date;
|
|
21
|
+
merchHarvestDay?: number;
|
|
22
|
+
newsHarvestDay?: number;
|
|
21
23
|
}
|
|
22
24
|
export type CanonArtistPk = "id";
|
|
23
25
|
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
24
|
-
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
26
|
+
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay";
|
|
25
27
|
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
26
28
|
export declare class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
27
29
|
name: string;
|
|
@@ -34,6 +36,8 @@ export declare class CanonArtist extends Model<CanonArtistAttributes, CanonArtis
|
|
|
34
36
|
hasThumbnailPhoto?: boolean;
|
|
35
37
|
images?: object;
|
|
36
38
|
lastImageHarvestAttempt?: Date;
|
|
39
|
+
merchHarvestDay?: number;
|
|
40
|
+
newsHarvestDay?: number;
|
|
37
41
|
canonArtistAlbumRelations: CanonArtistAlbumRelation[];
|
|
38
42
|
getCanonArtistAlbumRelations: Sequelize.HasManyGetAssociationsMixin<CanonArtistAlbumRelation>;
|
|
39
43
|
setCanonArtistAlbumRelations: Sequelize.HasManySetAssociationsMixin<CanonArtistAlbumRelation, CanonArtistAlbumRelationId>;
|
package/dist/CanonArtist.js
CHANGED
|
@@ -80,6 +80,16 @@ class CanonArtist extends sequelize_1.Model {
|
|
|
80
80
|
type: sequelize_1.DataTypes.DATE,
|
|
81
81
|
allowNull: true,
|
|
82
82
|
field: 'last_image_harvest_attempt'
|
|
83
|
+
},
|
|
84
|
+
merchHarvestDay: {
|
|
85
|
+
type: sequelize_1.DataTypes.NUMBER,
|
|
86
|
+
allowNull: true,
|
|
87
|
+
field: 'merch_harvest_day'
|
|
88
|
+
},
|
|
89
|
+
newsHarvestDay: {
|
|
90
|
+
type: sequelize_1.DataTypes.NUMBER,
|
|
91
|
+
allowNull: true,
|
|
92
|
+
field: 'news_harvest_day'
|
|
83
93
|
}
|
|
84
94
|
}, {
|
|
85
95
|
sequelize,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
|
+
import type { NewsPlatform, NewsPlatformId } from './NewsPlatform';
|
|
5
|
+
export interface NewsArticleAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
canonArtistId: string;
|
|
8
|
+
newsPlatformId: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
articleUrl: string;
|
|
12
|
+
photoUrl: string;
|
|
13
|
+
articlePublishDate: Date;
|
|
14
|
+
createDate: Date;
|
|
15
|
+
updateDate: Date;
|
|
16
|
+
}
|
|
17
|
+
export type NewsArticlePk = "id";
|
|
18
|
+
export type NewsArticleId = NewsArticle[NewsArticlePk];
|
|
19
|
+
export type NewsArticleOptionalAttributes = "id" | "articlePublishDate" | "createDate" | "updateDate";
|
|
20
|
+
export type NewsArticleCreationAttributes = Optional<NewsArticleAttributes, NewsArticleOptionalAttributes>;
|
|
21
|
+
export declare class NewsArticle extends Model<NewsArticleAttributes, NewsArticleCreationAttributes> implements NewsArticleAttributes {
|
|
22
|
+
id: string;
|
|
23
|
+
canonArtistId: string;
|
|
24
|
+
newsPlatformId: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string;
|
|
27
|
+
articleUrl: string;
|
|
28
|
+
photoUrl: string;
|
|
29
|
+
articlePublishDate: Date;
|
|
30
|
+
createDate: Date;
|
|
31
|
+
updateDate: Date;
|
|
32
|
+
canonArtist: CanonArtist;
|
|
33
|
+
getCanonArtist: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
34
|
+
setCanonArtist: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
35
|
+
createCanonArtist: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
36
|
+
newsPlatform: NewsPlatform;
|
|
37
|
+
getNewsPlatform: Sequelize.BelongsToGetAssociationMixin<NewsPlatform>;
|
|
38
|
+
setNewsPlatform: Sequelize.BelongsToSetAssociationMixin<NewsPlatform, NewsPlatformId>;
|
|
39
|
+
createNewsPlatform: Sequelize.BelongsToCreateAssociationMixin<NewsPlatform>;
|
|
40
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NewsArticle;
|
|
41
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.NewsArticle = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class NewsArticle extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return NewsArticle.init({
|
|
32
|
+
id: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v4'),
|
|
36
|
+
primaryKey: true
|
|
37
|
+
},
|
|
38
|
+
canonArtistId: {
|
|
39
|
+
type: sequelize_1.DataTypes.UUID,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
references: {
|
|
42
|
+
model: 'canon_artist',
|
|
43
|
+
key: 'id'
|
|
44
|
+
},
|
|
45
|
+
field: 'canon_artist_id'
|
|
46
|
+
},
|
|
47
|
+
newsPlatformId: {
|
|
48
|
+
type: sequelize_1.DataTypes.UUID,
|
|
49
|
+
allowNull: false,
|
|
50
|
+
references: {
|
|
51
|
+
model: 'news_platform',
|
|
52
|
+
key: 'id'
|
|
53
|
+
},
|
|
54
|
+
field: 'news_platform_id'
|
|
55
|
+
},
|
|
56
|
+
title: {
|
|
57
|
+
type: sequelize_1.DataTypes.CITEXT,
|
|
58
|
+
allowNull: false
|
|
59
|
+
},
|
|
60
|
+
description: {
|
|
61
|
+
type: sequelize_1.DataTypes.CITEXT,
|
|
62
|
+
allowNull: false
|
|
63
|
+
},
|
|
64
|
+
articleUrl: {
|
|
65
|
+
type: sequelize_1.DataTypes.CITEXT,
|
|
66
|
+
allowNull: false,
|
|
67
|
+
field: 'article_url'
|
|
68
|
+
},
|
|
69
|
+
photoUrl: {
|
|
70
|
+
type: sequelize_1.DataTypes.CITEXT,
|
|
71
|
+
allowNull: false,
|
|
72
|
+
field: 'photo_url'
|
|
73
|
+
},
|
|
74
|
+
articlePublishDate: {
|
|
75
|
+
type: sequelize_1.DataTypes.DATE,
|
|
76
|
+
allowNull: false,
|
|
77
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
78
|
+
field: 'article_publish_date'
|
|
79
|
+
},
|
|
80
|
+
createDate: {
|
|
81
|
+
type: sequelize_1.DataTypes.DATE,
|
|
82
|
+
allowNull: false,
|
|
83
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
84
|
+
field: 'create_date'
|
|
85
|
+
},
|
|
86
|
+
updateDate: {
|
|
87
|
+
type: sequelize_1.DataTypes.DATE,
|
|
88
|
+
allowNull: false,
|
|
89
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
90
|
+
field: 'update_date'
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
sequelize,
|
|
94
|
+
tableName: 'news_article',
|
|
95
|
+
schema: 'eb',
|
|
96
|
+
timestamps: false,
|
|
97
|
+
indexes: [
|
|
98
|
+
{
|
|
99
|
+
name: "news_article_pkey",
|
|
100
|
+
unique: true,
|
|
101
|
+
fields: [
|
|
102
|
+
{ name: "id" },
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.NewsArticle = NewsArticle;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { NewsArticle, NewsArticleId } from './NewsArticle';
|
|
4
|
+
export interface NewsPlatformAttributes {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
createDate: Date;
|
|
8
|
+
updateDate: Date;
|
|
9
|
+
}
|
|
10
|
+
export type NewsPlatformPk = "id";
|
|
11
|
+
export type NewsPlatformId = NewsPlatform[NewsPlatformPk];
|
|
12
|
+
export type NewsPlatformOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
13
|
+
export type NewsPlatformCreationAttributes = Optional<NewsPlatformAttributes, NewsPlatformOptionalAttributes>;
|
|
14
|
+
export declare class NewsPlatform extends Model<NewsPlatformAttributes, NewsPlatformCreationAttributes> implements NewsPlatformAttributes {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
createDate: Date;
|
|
18
|
+
updateDate: Date;
|
|
19
|
+
newsArticles: NewsArticle[];
|
|
20
|
+
getNewsArticles: Sequelize.HasManyGetAssociationsMixin<NewsArticle>;
|
|
21
|
+
setNewsArticles: Sequelize.HasManySetAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
22
|
+
addNewsArticle: Sequelize.HasManyAddAssociationMixin<NewsArticle, NewsArticleId>;
|
|
23
|
+
addNewsArticles: Sequelize.HasManyAddAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
24
|
+
createNewsArticle: Sequelize.HasManyCreateAssociationMixin<NewsArticle>;
|
|
25
|
+
removeNewsArticle: Sequelize.HasManyRemoveAssociationMixin<NewsArticle, NewsArticleId>;
|
|
26
|
+
removeNewsArticles: Sequelize.HasManyRemoveAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
27
|
+
hasNewsArticle: Sequelize.HasManyHasAssociationMixin<NewsArticle, NewsArticleId>;
|
|
28
|
+
hasNewsArticles: Sequelize.HasManyHasAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
29
|
+
countNewsArticles: Sequelize.HasManyCountAssociationsMixin;
|
|
30
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NewsPlatform;
|
|
31
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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.NewsPlatform = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class NewsPlatform extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return NewsPlatform.init({
|
|
32
|
+
id: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v4'),
|
|
36
|
+
primaryKey: true
|
|
37
|
+
},
|
|
38
|
+
name: {
|
|
39
|
+
type: sequelize_1.DataTypes.CITEXT,
|
|
40
|
+
allowNull: false
|
|
41
|
+
},
|
|
42
|
+
createDate: {
|
|
43
|
+
type: sequelize_1.DataTypes.DATE,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
46
|
+
field: 'create_date'
|
|
47
|
+
},
|
|
48
|
+
updateDate: {
|
|
49
|
+
type: sequelize_1.DataTypes.DATE,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
52
|
+
field: 'update_date'
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
sequelize,
|
|
56
|
+
tableName: 'news_platform',
|
|
57
|
+
schema: 'eb',
|
|
58
|
+
timestamps: false,
|
|
59
|
+
indexes: [
|
|
60
|
+
{
|
|
61
|
+
name: "news_platform_pkey",
|
|
62
|
+
unique: true,
|
|
63
|
+
fields: [
|
|
64
|
+
{ name: "id" },
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.NewsPlatform = NewsPlatform;
|
package/dist/init-models.d.ts
CHANGED
|
@@ -91,6 +91,10 @@ import { MetricsDaily as _MetricsDaily } from "./MetricsDaily";
|
|
|
91
91
|
import type { MetricsDailyAttributes, MetricsDailyCreationAttributes } from "./MetricsDaily";
|
|
92
92
|
import { MetricsEvent as _MetricsEvent } from "./MetricsEvent";
|
|
93
93
|
import type { MetricsEventAttributes, MetricsEventCreationAttributes } from "./MetricsEvent";
|
|
94
|
+
import { NewsArticle as _NewsArticle } from "./NewsArticle";
|
|
95
|
+
import type { NewsArticleAttributes, NewsArticleCreationAttributes } from "./NewsArticle";
|
|
96
|
+
import { NewsPlatform as _NewsPlatform } from "./NewsPlatform";
|
|
97
|
+
import type { NewsPlatformAttributes, NewsPlatformCreationAttributes } from "./NewsPlatform";
|
|
94
98
|
import { NewsSite as _NewsSite } from "./NewsSite";
|
|
95
99
|
import type { NewsSiteAttributes, NewsSiteCreationAttributes } from "./NewsSite";
|
|
96
100
|
import { Notification as _Notification } from "./Notification";
|
|
@@ -153,8 +157,8 @@ import { UnmatchedArtist as _UnmatchedArtist } from "./UnmatchedArtist";
|
|
|
153
157
|
import type { UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes } from "./UnmatchedArtist";
|
|
154
158
|
import { UserContacts as _UserContacts } from "./UserContacts";
|
|
155
159
|
import type { UserContactsAttributes, UserContactsCreationAttributes } from "./UserContacts";
|
|
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, };
|
|
160
|
+
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, _NewsArticle as NewsArticle, _NewsPlatform as NewsPlatform, _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, };
|
|
161
|
+
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, NewsArticleAttributes, NewsArticleCreationAttributes, NewsPlatformAttributes, NewsPlatformCreationAttributes, 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, };
|
|
158
162
|
export declare function initModels(sequelize: Sequelize): {
|
|
159
163
|
AccessControlPreference: typeof _AccessControlPreference;
|
|
160
164
|
AppUser: typeof _AppUser;
|
|
@@ -202,6 +206,8 @@ export declare function initModels(sequelize: Sequelize): {
|
|
|
202
206
|
KnexMigrationsLock: typeof _KnexMigrationsLock;
|
|
203
207
|
MetricsDaily: typeof _MetricsDaily;
|
|
204
208
|
MetricsEvent: typeof _MetricsEvent;
|
|
209
|
+
NewsArticle: typeof _NewsArticle;
|
|
210
|
+
NewsPlatform: typeof _NewsPlatform;
|
|
205
211
|
NewsSite: typeof _NewsSite;
|
|
206
212
|
Notification: typeof _Notification;
|
|
207
213
|
NotificationType: typeof _NotificationType;
|
package/dist/init-models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.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;
|
|
3
|
+
exports.Notification = exports.NewsSite = exports.NewsPlatform = exports.NewsArticle = 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 = exports.PauseStatusType = exports.NotificationType = void 0;
|
|
5
5
|
exports.initModels = initModels;
|
|
6
6
|
const AccessControlPreference_1 = require("./AccessControlPreference");
|
|
7
7
|
Object.defineProperty(exports, "AccessControlPreference", { enumerable: true, get: function () { return AccessControlPreference_1.AccessControlPreference; } });
|
|
@@ -95,6 +95,10 @@ const MetricsDaily_1 = require("./MetricsDaily");
|
|
|
95
95
|
Object.defineProperty(exports, "MetricsDaily", { enumerable: true, get: function () { return MetricsDaily_1.MetricsDaily; } });
|
|
96
96
|
const MetricsEvent_1 = require("./MetricsEvent");
|
|
97
97
|
Object.defineProperty(exports, "MetricsEvent", { enumerable: true, get: function () { return MetricsEvent_1.MetricsEvent; } });
|
|
98
|
+
const NewsArticle_1 = require("./NewsArticle");
|
|
99
|
+
Object.defineProperty(exports, "NewsArticle", { enumerable: true, get: function () { return NewsArticle_1.NewsArticle; } });
|
|
100
|
+
const NewsPlatform_1 = require("./NewsPlatform");
|
|
101
|
+
Object.defineProperty(exports, "NewsPlatform", { enumerable: true, get: function () { return NewsPlatform_1.NewsPlatform; } });
|
|
98
102
|
const NewsSite_1 = require("./NewsSite");
|
|
99
103
|
Object.defineProperty(exports, "NewsSite", { enumerable: true, get: function () { return NewsSite_1.NewsSite; } });
|
|
100
104
|
const Notification_1 = require("./Notification");
|
|
@@ -204,6 +208,8 @@ function initModels(sequelize) {
|
|
|
204
208
|
const KnexMigrationsLock = KnexMigrationsLock_1.KnexMigrationsLock.initModel(sequelize);
|
|
205
209
|
const MetricsDaily = MetricsDaily_1.MetricsDaily.initModel(sequelize);
|
|
206
210
|
const MetricsEvent = MetricsEvent_1.MetricsEvent.initModel(sequelize);
|
|
211
|
+
const NewsArticle = NewsArticle_1.NewsArticle.initModel(sequelize);
|
|
212
|
+
const NewsPlatform = NewsPlatform_1.NewsPlatform.initModel(sequelize);
|
|
207
213
|
const NewsSite = NewsSite_1.NewsSite.initModel(sequelize);
|
|
208
214
|
const Notification = Notification_1.Notification.initModel(sequelize);
|
|
209
215
|
const NotificationType = NotificationType_1.NotificationType.initModel(sequelize);
|
|
@@ -323,6 +329,8 @@ function initModels(sequelize) {
|
|
|
323
329
|
CanonArtist.hasMany(CanonArtistTrackRelation, { as: "canonArtistTrackRelations", foreignKey: "canonArtistId" });
|
|
324
330
|
CanonToPlatformArtistRelation.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
325
331
|
CanonArtist.hasMany(CanonToPlatformArtistRelation, { as: "canonToPlatformArtistRelations", foreignKey: "canonArtistId" });
|
|
332
|
+
NewsArticle.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
333
|
+
CanonArtist.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "canonArtistId" });
|
|
326
334
|
CanonAlbumGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
327
335
|
CanonGenre.hasMany(CanonAlbumGenreRelation, { as: "canonAlbumGenreRelations", foreignKey: "canonGenreId" });
|
|
328
336
|
CanonArtistGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId" });
|
|
@@ -387,6 +395,8 @@ function initModels(sequelize) {
|
|
|
387
395
|
JukeboxType.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "typeId" });
|
|
388
396
|
JukeboxUser.belongsTo(JukeboxUserType, { as: "jukeboxUserType", foreignKey: "jukeboxUserTypeId" });
|
|
389
397
|
JukeboxUserType.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxUserTypeId" });
|
|
398
|
+
NewsArticle.belongsTo(NewsPlatform, { as: "newsPlatform", foreignKey: "newsPlatformId" });
|
|
399
|
+
NewsPlatform.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "newsPlatformId" });
|
|
390
400
|
Notification.belongsTo(NotificationType, { as: "notificationType", foreignKey: "notificationTypeId" });
|
|
391
401
|
NotificationType.hasMany(Notification, { as: "notifications", foreignKey: "notificationTypeId" });
|
|
392
402
|
JukeboxUser.belongsTo(PauseStatusType, { as: "pauseStatusType", foreignKey: "pauseStatusTypeId" });
|
|
@@ -530,6 +540,8 @@ function initModels(sequelize) {
|
|
|
530
540
|
KnexMigrationsLock: KnexMigrationsLock,
|
|
531
541
|
MetricsDaily: MetricsDaily,
|
|
532
542
|
MetricsEvent: MetricsEvent,
|
|
543
|
+
NewsArticle: NewsArticle,
|
|
544
|
+
NewsPlatform: NewsPlatform,
|
|
533
545
|
NewsSite: NewsSite,
|
|
534
546
|
Notification: Notification,
|
|
535
547
|
NotificationType: NotificationType,
|
package/models/CanonArtist.ts
CHANGED
|
@@ -19,11 +19,13 @@ export interface CanonArtistAttributes {
|
|
|
19
19
|
hasThumbnailPhoto?: boolean;
|
|
20
20
|
images?: object;
|
|
21
21
|
lastImageHarvestAttempt?: Date;
|
|
22
|
+
merchHarvestDay?: number;
|
|
23
|
+
newsHarvestDay?: number;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export type CanonArtistPk = "id";
|
|
25
27
|
export type CanonArtistId = CanonArtist[CanonArtistPk];
|
|
26
|
-
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
|
|
28
|
+
export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt" | "merchHarvestDay" | "newsHarvestDay";
|
|
27
29
|
export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
|
|
28
30
|
|
|
29
31
|
export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
|
|
@@ -37,6 +39,8 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
37
39
|
hasThumbnailPhoto?: boolean;
|
|
38
40
|
images?: object;
|
|
39
41
|
lastImageHarvestAttempt?: Date;
|
|
42
|
+
merchHarvestDay?: number;
|
|
43
|
+
newsHarvestDay?: number;
|
|
40
44
|
|
|
41
45
|
// CanonArtist hasMany CanonArtistAlbumRelation via canonArtistId
|
|
42
46
|
canonArtistAlbumRelations!: CanonArtistAlbumRelation[];
|
|
@@ -176,6 +180,16 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
|
|
|
176
180
|
type: DataTypes.DATE,
|
|
177
181
|
allowNull: true,
|
|
178
182
|
field: 'last_image_harvest_attempt'
|
|
183
|
+
},
|
|
184
|
+
merchHarvestDay: {
|
|
185
|
+
type: DataTypes.NUMBER,
|
|
186
|
+
allowNull: true,
|
|
187
|
+
field: 'merch_harvest_day'
|
|
188
|
+
},
|
|
189
|
+
newsHarvestDay: {
|
|
190
|
+
type: DataTypes.NUMBER,
|
|
191
|
+
allowNull: true,
|
|
192
|
+
field: 'news_harvest_day'
|
|
179
193
|
}
|
|
180
194
|
}, {
|
|
181
195
|
sequelize,
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { CanonArtist, CanonArtistId } from './CanonArtist';
|
|
4
|
+
import type { NewsPlatform, NewsPlatformId } from './NewsPlatform';
|
|
5
|
+
|
|
6
|
+
export interface NewsArticleAttributes {
|
|
7
|
+
id: string;
|
|
8
|
+
canonArtistId: string;
|
|
9
|
+
newsPlatformId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
articleUrl: string;
|
|
13
|
+
photoUrl: string;
|
|
14
|
+
articlePublishDate: Date;
|
|
15
|
+
createDate: Date;
|
|
16
|
+
updateDate: Date;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type NewsArticlePk = "id";
|
|
20
|
+
export type NewsArticleId = NewsArticle[NewsArticlePk];
|
|
21
|
+
export type NewsArticleOptionalAttributes = "id" | "articlePublishDate" | "createDate" | "updateDate";
|
|
22
|
+
export type NewsArticleCreationAttributes = Optional<NewsArticleAttributes, NewsArticleOptionalAttributes>;
|
|
23
|
+
|
|
24
|
+
export class NewsArticle extends Model<NewsArticleAttributes, NewsArticleCreationAttributes> implements NewsArticleAttributes {
|
|
25
|
+
id!: string;
|
|
26
|
+
canonArtistId!: string;
|
|
27
|
+
newsPlatformId!: string;
|
|
28
|
+
title!: string;
|
|
29
|
+
description!: string;
|
|
30
|
+
articleUrl!: string;
|
|
31
|
+
photoUrl!: string;
|
|
32
|
+
articlePublishDate!: Date;
|
|
33
|
+
createDate!: Date;
|
|
34
|
+
updateDate!: Date;
|
|
35
|
+
|
|
36
|
+
// NewsArticle belongsTo CanonArtist via canonArtistId
|
|
37
|
+
canonArtist!: CanonArtist;
|
|
38
|
+
getCanonArtist!: Sequelize.BelongsToGetAssociationMixin<CanonArtist>;
|
|
39
|
+
setCanonArtist!: Sequelize.BelongsToSetAssociationMixin<CanonArtist, CanonArtistId>;
|
|
40
|
+
createCanonArtist!: Sequelize.BelongsToCreateAssociationMixin<CanonArtist>;
|
|
41
|
+
// NewsArticle belongsTo NewsPlatform via newsPlatformId
|
|
42
|
+
newsPlatform!: NewsPlatform;
|
|
43
|
+
getNewsPlatform!: Sequelize.BelongsToGetAssociationMixin<NewsPlatform>;
|
|
44
|
+
setNewsPlatform!: Sequelize.BelongsToSetAssociationMixin<NewsPlatform, NewsPlatformId>;
|
|
45
|
+
createNewsPlatform!: Sequelize.BelongsToCreateAssociationMixin<NewsPlatform>;
|
|
46
|
+
|
|
47
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NewsArticle {
|
|
48
|
+
return NewsArticle.init({
|
|
49
|
+
id: {
|
|
50
|
+
type: DataTypes.UUID,
|
|
51
|
+
allowNull: false,
|
|
52
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v4'),
|
|
53
|
+
primaryKey: true
|
|
54
|
+
},
|
|
55
|
+
canonArtistId: {
|
|
56
|
+
type: DataTypes.UUID,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
references: {
|
|
59
|
+
model: 'canon_artist',
|
|
60
|
+
key: 'id'
|
|
61
|
+
},
|
|
62
|
+
field: 'canon_artist_id'
|
|
63
|
+
},
|
|
64
|
+
newsPlatformId: {
|
|
65
|
+
type: DataTypes.UUID,
|
|
66
|
+
allowNull: false,
|
|
67
|
+
references: {
|
|
68
|
+
model: 'news_platform',
|
|
69
|
+
key: 'id'
|
|
70
|
+
},
|
|
71
|
+
field: 'news_platform_id'
|
|
72
|
+
},
|
|
73
|
+
title: {
|
|
74
|
+
type: DataTypes.CITEXT,
|
|
75
|
+
allowNull: false
|
|
76
|
+
},
|
|
77
|
+
description: {
|
|
78
|
+
type: DataTypes.CITEXT,
|
|
79
|
+
allowNull: false
|
|
80
|
+
},
|
|
81
|
+
articleUrl: {
|
|
82
|
+
type: DataTypes.CITEXT,
|
|
83
|
+
allowNull: false,
|
|
84
|
+
field: 'article_url'
|
|
85
|
+
},
|
|
86
|
+
photoUrl: {
|
|
87
|
+
type: DataTypes.CITEXT,
|
|
88
|
+
allowNull: false,
|
|
89
|
+
field: 'photo_url'
|
|
90
|
+
},
|
|
91
|
+
articlePublishDate: {
|
|
92
|
+
type: DataTypes.DATE,
|
|
93
|
+
allowNull: false,
|
|
94
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
95
|
+
field: 'article_publish_date'
|
|
96
|
+
},
|
|
97
|
+
createDate: {
|
|
98
|
+
type: DataTypes.DATE,
|
|
99
|
+
allowNull: false,
|
|
100
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
101
|
+
field: 'create_date'
|
|
102
|
+
},
|
|
103
|
+
updateDate: {
|
|
104
|
+
type: DataTypes.DATE,
|
|
105
|
+
allowNull: false,
|
|
106
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
107
|
+
field: 'update_date'
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
sequelize,
|
|
111
|
+
tableName: 'news_article',
|
|
112
|
+
schema: 'eb',
|
|
113
|
+
timestamps: false,
|
|
114
|
+
indexes: [
|
|
115
|
+
{
|
|
116
|
+
name: "news_article_pkey",
|
|
117
|
+
unique: true,
|
|
118
|
+
fields: [
|
|
119
|
+
{ name: "id" },
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
+
import type { NewsArticle, NewsArticleId } from './NewsArticle';
|
|
4
|
+
|
|
5
|
+
export interface NewsPlatformAttributes {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
createDate: Date;
|
|
9
|
+
updateDate: Date;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type NewsPlatformPk = "id";
|
|
13
|
+
export type NewsPlatformId = NewsPlatform[NewsPlatformPk];
|
|
14
|
+
export type NewsPlatformOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
15
|
+
export type NewsPlatformCreationAttributes = Optional<NewsPlatformAttributes, NewsPlatformOptionalAttributes>;
|
|
16
|
+
|
|
17
|
+
export class NewsPlatform extends Model<NewsPlatformAttributes, NewsPlatformCreationAttributes> implements NewsPlatformAttributes {
|
|
18
|
+
id!: string;
|
|
19
|
+
name!: string;
|
|
20
|
+
createDate!: Date;
|
|
21
|
+
updateDate!: Date;
|
|
22
|
+
|
|
23
|
+
// NewsPlatform hasMany NewsArticle via newsPlatformId
|
|
24
|
+
newsArticles!: NewsArticle[];
|
|
25
|
+
getNewsArticles!: Sequelize.HasManyGetAssociationsMixin<NewsArticle>;
|
|
26
|
+
setNewsArticles!: Sequelize.HasManySetAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
27
|
+
addNewsArticle!: Sequelize.HasManyAddAssociationMixin<NewsArticle, NewsArticleId>;
|
|
28
|
+
addNewsArticles!: Sequelize.HasManyAddAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
29
|
+
createNewsArticle!: Sequelize.HasManyCreateAssociationMixin<NewsArticle>;
|
|
30
|
+
removeNewsArticle!: Sequelize.HasManyRemoveAssociationMixin<NewsArticle, NewsArticleId>;
|
|
31
|
+
removeNewsArticles!: Sequelize.HasManyRemoveAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
32
|
+
hasNewsArticle!: Sequelize.HasManyHasAssociationMixin<NewsArticle, NewsArticleId>;
|
|
33
|
+
hasNewsArticles!: Sequelize.HasManyHasAssociationsMixin<NewsArticle, NewsArticleId>;
|
|
34
|
+
countNewsArticles!: Sequelize.HasManyCountAssociationsMixin;
|
|
35
|
+
|
|
36
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NewsPlatform {
|
|
37
|
+
return NewsPlatform.init({
|
|
38
|
+
id: {
|
|
39
|
+
type: DataTypes.UUID,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v4'),
|
|
42
|
+
primaryKey: true
|
|
43
|
+
},
|
|
44
|
+
name: {
|
|
45
|
+
type: DataTypes.CITEXT,
|
|
46
|
+
allowNull: false
|
|
47
|
+
},
|
|
48
|
+
createDate: {
|
|
49
|
+
type: DataTypes.DATE,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
52
|
+
field: 'create_date'
|
|
53
|
+
},
|
|
54
|
+
updateDate: {
|
|
55
|
+
type: DataTypes.DATE,
|
|
56
|
+
allowNull: false,
|
|
57
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
58
|
+
field: 'update_date'
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
sequelize,
|
|
62
|
+
tableName: 'news_platform',
|
|
63
|
+
schema: 'eb',
|
|
64
|
+
timestamps: false,
|
|
65
|
+
indexes: [
|
|
66
|
+
{
|
|
67
|
+
name: "news_platform_pkey",
|
|
68
|
+
unique: true,
|
|
69
|
+
fields: [
|
|
70
|
+
{ name: "id" },
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
package/models/init-models.ts
CHANGED
|
@@ -91,6 +91,10 @@ import { MetricsDaily as _MetricsDaily } from "./MetricsDaily";
|
|
|
91
91
|
import type { MetricsDailyAttributes, MetricsDailyCreationAttributes } from "./MetricsDaily";
|
|
92
92
|
import { MetricsEvent as _MetricsEvent } from "./MetricsEvent";
|
|
93
93
|
import type { MetricsEventAttributes, MetricsEventCreationAttributes } from "./MetricsEvent";
|
|
94
|
+
import { NewsArticle as _NewsArticle } from "./NewsArticle";
|
|
95
|
+
import type { NewsArticleAttributes, NewsArticleCreationAttributes } from "./NewsArticle";
|
|
96
|
+
import { NewsPlatform as _NewsPlatform } from "./NewsPlatform";
|
|
97
|
+
import type { NewsPlatformAttributes, NewsPlatformCreationAttributes } from "./NewsPlatform";
|
|
94
98
|
import { NewsSite as _NewsSite } from "./NewsSite";
|
|
95
99
|
import type { NewsSiteAttributes, NewsSiteCreationAttributes } from "./NewsSite";
|
|
96
100
|
import { Notification as _Notification } from "./Notification";
|
|
@@ -201,6 +205,8 @@ export {
|
|
|
201
205
|
_KnexMigrationsLock as KnexMigrationsLock,
|
|
202
206
|
_MetricsDaily as MetricsDaily,
|
|
203
207
|
_MetricsEvent as MetricsEvent,
|
|
208
|
+
_NewsArticle as NewsArticle,
|
|
209
|
+
_NewsPlatform as NewsPlatform,
|
|
204
210
|
_NewsSite as NewsSite,
|
|
205
211
|
_Notification as Notification,
|
|
206
212
|
_NotificationType as NotificationType,
|
|
@@ -327,6 +333,10 @@ export type {
|
|
|
327
333
|
MetricsDailyCreationAttributes,
|
|
328
334
|
MetricsEventAttributes,
|
|
329
335
|
MetricsEventCreationAttributes,
|
|
336
|
+
NewsArticleAttributes,
|
|
337
|
+
NewsArticleCreationAttributes,
|
|
338
|
+
NewsPlatformAttributes,
|
|
339
|
+
NewsPlatformCreationAttributes,
|
|
330
340
|
NewsSiteAttributes,
|
|
331
341
|
NewsSiteCreationAttributes,
|
|
332
342
|
NotificationAttributes,
|
|
@@ -438,6 +448,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
438
448
|
const KnexMigrationsLock = _KnexMigrationsLock.initModel(sequelize);
|
|
439
449
|
const MetricsDaily = _MetricsDaily.initModel(sequelize);
|
|
440
450
|
const MetricsEvent = _MetricsEvent.initModel(sequelize);
|
|
451
|
+
const NewsArticle = _NewsArticle.initModel(sequelize);
|
|
452
|
+
const NewsPlatform = _NewsPlatform.initModel(sequelize);
|
|
441
453
|
const NewsSite = _NewsSite.initModel(sequelize);
|
|
442
454
|
const Notification = _Notification.initModel(sequelize);
|
|
443
455
|
const NotificationType = _NotificationType.initModel(sequelize);
|
|
@@ -558,6 +570,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
558
570
|
CanonArtist.hasMany(CanonArtistTrackRelation, { as: "canonArtistTrackRelations", foreignKey: "canonArtistId"});
|
|
559
571
|
CanonToPlatformArtistRelation.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId"});
|
|
560
572
|
CanonArtist.hasMany(CanonToPlatformArtistRelation, { as: "canonToPlatformArtistRelations", foreignKey: "canonArtistId"});
|
|
573
|
+
NewsArticle.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId"});
|
|
574
|
+
CanonArtist.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "canonArtistId"});
|
|
561
575
|
CanonAlbumGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId"});
|
|
562
576
|
CanonGenre.hasMany(CanonAlbumGenreRelation, { as: "canonAlbumGenreRelations", foreignKey: "canonGenreId"});
|
|
563
577
|
CanonArtistGenreRelation.belongsTo(CanonGenre, { as: "canonGenre", foreignKey: "canonGenreId"});
|
|
@@ -622,6 +636,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
622
636
|
JukeboxType.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "typeId"});
|
|
623
637
|
JukeboxUser.belongsTo(JukeboxUserType, { as: "jukeboxUserType", foreignKey: "jukeboxUserTypeId"});
|
|
624
638
|
JukeboxUserType.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxUserTypeId"});
|
|
639
|
+
NewsArticle.belongsTo(NewsPlatform, { as: "newsPlatform", foreignKey: "newsPlatformId"});
|
|
640
|
+
NewsPlatform.hasMany(NewsArticle, { as: "newsArticles", foreignKey: "newsPlatformId"});
|
|
625
641
|
Notification.belongsTo(NotificationType, { as: "notificationType", foreignKey: "notificationTypeId"});
|
|
626
642
|
NotificationType.hasMany(Notification, { as: "notifications", foreignKey: "notificationTypeId"});
|
|
627
643
|
JukeboxUser.belongsTo(PauseStatusType, { as: "pauseStatusType", foreignKey: "pauseStatusTypeId"});
|
|
@@ -766,6 +782,8 @@ export function initModels(sequelize: Sequelize) {
|
|
|
766
782
|
KnexMigrationsLock: KnexMigrationsLock,
|
|
767
783
|
MetricsDaily: MetricsDaily,
|
|
768
784
|
MetricsEvent: MetricsEvent,
|
|
785
|
+
NewsArticle: NewsArticle,
|
|
786
|
+
NewsPlatform: NewsPlatform,
|
|
769
787
|
NewsSite: NewsSite,
|
|
770
788
|
Notification: Notification,
|
|
771
789
|
NotificationType: NotificationType,
|