@earbug/db-models 0.0.16 → 0.0.18
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/.github/workflows/publish.yaml +54 -0
- package/.nvmrc +1 -1
- package/dist/AppUser.d.ts +24 -0
- package/dist/CanonArtist.d.ts +21 -21
- package/dist/CanonArtist.js +43 -32
- package/dist/JukeboxSession.d.ts +24 -0
- package/dist/MerchItem.d.ts +3 -3
- package/dist/MerchItem.js +6 -6
- package/dist/MerchOrchestration.d.ts +3 -3
- package/dist/MerchOrchestration.js +6 -6
- package/dist/MerchPlatform.d.ts +2 -2
- package/dist/MerchPlatform.js +6 -6
- package/dist/MerchType.d.ts +2 -2
- package/dist/MerchType.js +4 -4
- package/dist/PlatformUserPlaylist.d.ts +24 -0
- package/dist/RadioShow.d.ts +24 -0
- package/dist/UserComments.d.ts +55 -0
- package/dist/UserComments.js +151 -0
- package/dist/UserLikes.d.ts +45 -0
- package/dist/UserLikes.js +151 -0
- package/dist/init-models.d.ts +8 -2
- package/dist/init-models.js +29 -3
- package/models/AppUser.ts +26 -0
- package/models/CanonArtist.ts +191 -413
- package/models/JukeboxSession.ts +26 -0
- package/models/MerchItem.ts +9 -9
- package/models/MerchOrchestration.ts +9 -9
- package/models/MerchPlatform.ts +8 -8
- package/models/MerchType.ts +6 -6
- package/models/PlatformUserPlaylist.ts +26 -0
- package/models/RadioShow.ts +26 -0
- package/models/UserComments.ts +184 -0
- package/models/UserLikes.ts +173 -0
- package/models/init-models.ts +34 -2
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
5
|
+
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
7
|
+
export interface UserCommentsAttributes {
|
|
8
|
+
appUserId: string;
|
|
9
|
+
jukeboxId?: string;
|
|
10
|
+
playlistId?: string;
|
|
11
|
+
radioShowId?: string;
|
|
12
|
+
comment: string;
|
|
13
|
+
id: string;
|
|
14
|
+
replyCommentId?: string;
|
|
15
|
+
deleted: boolean;
|
|
16
|
+
createDate: Date;
|
|
17
|
+
updateDate: Date;
|
|
18
|
+
}
|
|
19
|
+
export type UserCommentsPk = "id";
|
|
20
|
+
export type UserCommentsId = UserComments[UserCommentsPk];
|
|
21
|
+
export type UserCommentsOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "replyCommentId" | "createDate" | "updateDate";
|
|
22
|
+
export type UserCommentsCreationAttributes = Optional<UserCommentsAttributes, UserCommentsOptionalAttributes>;
|
|
23
|
+
export declare class UserComments extends Model<UserCommentsAttributes, UserCommentsCreationAttributes> implements UserCommentsAttributes {
|
|
24
|
+
appUserId: string;
|
|
25
|
+
jukeboxId?: string;
|
|
26
|
+
playlistId?: string;
|
|
27
|
+
radioShowId?: string;
|
|
28
|
+
comment: string;
|
|
29
|
+
id: string;
|
|
30
|
+
replyCommentId?: string;
|
|
31
|
+
deleted: boolean;
|
|
32
|
+
createDate: Date;
|
|
33
|
+
updateDate: Date;
|
|
34
|
+
appUser: AppUser;
|
|
35
|
+
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
36
|
+
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
37
|
+
createAppUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
38
|
+
jukebox: JukeboxSession;
|
|
39
|
+
getJukebox: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
40
|
+
setJukebox: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
41
|
+
createJukebox: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
42
|
+
playlist: PlatformUserPlaylist;
|
|
43
|
+
getPlaylist: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
44
|
+
setPlaylist: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
45
|
+
createPlaylist: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
46
|
+
radioShow: RadioShow;
|
|
47
|
+
getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
48
|
+
setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
49
|
+
createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
50
|
+
replyComment: UserComments;
|
|
51
|
+
getReplyComment: Sequelize.BelongsToGetAssociationMixin<UserComments>;
|
|
52
|
+
setReplyComment: Sequelize.BelongsToSetAssociationMixin<UserComments, UserCommentsId>;
|
|
53
|
+
createReplyComment: Sequelize.BelongsToCreateAssociationMixin<UserComments>;
|
|
54
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserComments;
|
|
55
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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.UserComments = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class UserComments extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return UserComments.init({
|
|
32
|
+
appUserId: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
references: {
|
|
36
|
+
model: 'app_user',
|
|
37
|
+
key: 'id'
|
|
38
|
+
},
|
|
39
|
+
field: 'app_user_id'
|
|
40
|
+
},
|
|
41
|
+
jukeboxId: {
|
|
42
|
+
type: sequelize_1.DataTypes.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
references: {
|
|
45
|
+
model: 'jukebox_session',
|
|
46
|
+
key: 'id'
|
|
47
|
+
},
|
|
48
|
+
field: 'jukebox_id'
|
|
49
|
+
},
|
|
50
|
+
playlistId: {
|
|
51
|
+
type: sequelize_1.DataTypes.UUID,
|
|
52
|
+
allowNull: true,
|
|
53
|
+
references: {
|
|
54
|
+
model: 'platform_user_playlist',
|
|
55
|
+
key: 'id'
|
|
56
|
+
},
|
|
57
|
+
field: 'playlist_id'
|
|
58
|
+
},
|
|
59
|
+
radioShowId: {
|
|
60
|
+
type: sequelize_1.DataTypes.UUID,
|
|
61
|
+
allowNull: true,
|
|
62
|
+
references: {
|
|
63
|
+
model: 'radio_show',
|
|
64
|
+
key: 'id'
|
|
65
|
+
},
|
|
66
|
+
field: 'radio_show_id'
|
|
67
|
+
},
|
|
68
|
+
comment: {
|
|
69
|
+
type: sequelize_1.DataTypes.STRING(1000),
|
|
70
|
+
allowNull: false
|
|
71
|
+
},
|
|
72
|
+
id: {
|
|
73
|
+
type: sequelize_1.DataTypes.UUID,
|
|
74
|
+
allowNull: false,
|
|
75
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
76
|
+
primaryKey: true
|
|
77
|
+
},
|
|
78
|
+
replyCommentId: {
|
|
79
|
+
type: sequelize_1.DataTypes.UUID,
|
|
80
|
+
allowNull: true,
|
|
81
|
+
references: {
|
|
82
|
+
model: 'user_comments',
|
|
83
|
+
key: 'id'
|
|
84
|
+
},
|
|
85
|
+
field: 'reply_comment_id'
|
|
86
|
+
},
|
|
87
|
+
deleted: {
|
|
88
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
89
|
+
allowNull: false,
|
|
90
|
+
defaultValue: false
|
|
91
|
+
},
|
|
92
|
+
createDate: {
|
|
93
|
+
type: sequelize_1.DataTypes.DATE,
|
|
94
|
+
allowNull: false,
|
|
95
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
96
|
+
field: 'create_date'
|
|
97
|
+
},
|
|
98
|
+
updateDate: {
|
|
99
|
+
type: sequelize_1.DataTypes.DATE,
|
|
100
|
+
allowNull: false,
|
|
101
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
102
|
+
field: 'update_date'
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
sequelize,
|
|
106
|
+
tableName: 'user_comments',
|
|
107
|
+
schema: 'eb',
|
|
108
|
+
timestamps: false,
|
|
109
|
+
indexes: [
|
|
110
|
+
{
|
|
111
|
+
name: "idx_user_comments_jukebox",
|
|
112
|
+
fields: [
|
|
113
|
+
{ name: "jukebox_id" },
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "idx_user_comments_playlist",
|
|
118
|
+
fields: [
|
|
119
|
+
{ name: "playlist_id" },
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "idx_user_comments_radio_show",
|
|
124
|
+
fields: [
|
|
125
|
+
{ name: "radio_show_id" },
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "idx_user_comments_reply",
|
|
130
|
+
fields: [
|
|
131
|
+
{ name: "reply_comment_id" },
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "idx_user_comments_user",
|
|
136
|
+
fields: [
|
|
137
|
+
{ name: "app_user_id" },
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "user_comments_pkey",
|
|
142
|
+
unique: true,
|
|
143
|
+
fields: [
|
|
144
|
+
{ name: "id" },
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.UserComments = UserComments;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
|
|
5
|
+
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
6
|
+
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
7
|
+
export interface UserLikesAttributes {
|
|
8
|
+
appUserId: string;
|
|
9
|
+
jukeboxId?: string;
|
|
10
|
+
playlistId?: string;
|
|
11
|
+
radioShowId?: string;
|
|
12
|
+
id: string;
|
|
13
|
+
createDate: Date;
|
|
14
|
+
updateDate: Date;
|
|
15
|
+
}
|
|
16
|
+
export type UserLikesPk = "id";
|
|
17
|
+
export type UserLikesId = UserLikes[UserLikesPk];
|
|
18
|
+
export type UserLikesOptionalAttributes = "jukeboxId" | "playlistId" | "radioShowId" | "id" | "createDate" | "updateDate";
|
|
19
|
+
export type UserLikesCreationAttributes = Optional<UserLikesAttributes, UserLikesOptionalAttributes>;
|
|
20
|
+
export declare class UserLikes extends Model<UserLikesAttributes, UserLikesCreationAttributes> implements UserLikesAttributes {
|
|
21
|
+
appUserId: string;
|
|
22
|
+
jukeboxId?: string;
|
|
23
|
+
playlistId?: string;
|
|
24
|
+
radioShowId?: string;
|
|
25
|
+
id: string;
|
|
26
|
+
createDate: Date;
|
|
27
|
+
updateDate: Date;
|
|
28
|
+
appUser: AppUser;
|
|
29
|
+
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
30
|
+
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
31
|
+
createAppUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
32
|
+
jukebox: JukeboxSession;
|
|
33
|
+
getJukebox: Sequelize.BelongsToGetAssociationMixin<JukeboxSession>;
|
|
34
|
+
setJukebox: Sequelize.BelongsToSetAssociationMixin<JukeboxSession, JukeboxSessionId>;
|
|
35
|
+
createJukebox: Sequelize.BelongsToCreateAssociationMixin<JukeboxSession>;
|
|
36
|
+
playlist: PlatformUserPlaylist;
|
|
37
|
+
getPlaylist: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
|
|
38
|
+
setPlaylist: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
|
|
39
|
+
createPlaylist: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
|
|
40
|
+
radioShow: RadioShow;
|
|
41
|
+
getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
|
|
42
|
+
setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
|
|
43
|
+
createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
|
|
44
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserLikes;
|
|
45
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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.UserLikes = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class UserLikes extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return UserLikes.init({
|
|
32
|
+
appUserId: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
references: {
|
|
36
|
+
model: 'app_user',
|
|
37
|
+
key: 'id'
|
|
38
|
+
},
|
|
39
|
+
field: 'app_user_id'
|
|
40
|
+
},
|
|
41
|
+
jukeboxId: {
|
|
42
|
+
type: sequelize_1.DataTypes.UUID,
|
|
43
|
+
allowNull: true,
|
|
44
|
+
references: {
|
|
45
|
+
model: 'jukebox_session',
|
|
46
|
+
key: 'id'
|
|
47
|
+
},
|
|
48
|
+
field: 'jukebox_id'
|
|
49
|
+
},
|
|
50
|
+
playlistId: {
|
|
51
|
+
type: sequelize_1.DataTypes.UUID,
|
|
52
|
+
allowNull: true,
|
|
53
|
+
references: {
|
|
54
|
+
model: 'platform_user_playlist',
|
|
55
|
+
key: 'id'
|
|
56
|
+
},
|
|
57
|
+
field: 'playlist_id'
|
|
58
|
+
},
|
|
59
|
+
radioShowId: {
|
|
60
|
+
type: sequelize_1.DataTypes.UUID,
|
|
61
|
+
allowNull: true,
|
|
62
|
+
references: {
|
|
63
|
+
model: 'radio_show',
|
|
64
|
+
key: 'id'
|
|
65
|
+
},
|
|
66
|
+
field: 'radio_show_id'
|
|
67
|
+
},
|
|
68
|
+
id: {
|
|
69
|
+
type: sequelize_1.DataTypes.UUID,
|
|
70
|
+
allowNull: false,
|
|
71
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
72
|
+
primaryKey: true
|
|
73
|
+
},
|
|
74
|
+
createDate: {
|
|
75
|
+
type: sequelize_1.DataTypes.DATE,
|
|
76
|
+
allowNull: false,
|
|
77
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
78
|
+
field: 'create_date'
|
|
79
|
+
},
|
|
80
|
+
updateDate: {
|
|
81
|
+
type: sequelize_1.DataTypes.DATE,
|
|
82
|
+
allowNull: false,
|
|
83
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
84
|
+
field: 'update_date'
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
sequelize,
|
|
88
|
+
tableName: 'user_likes',
|
|
89
|
+
schema: 'eb',
|
|
90
|
+
timestamps: false,
|
|
91
|
+
indexes: [
|
|
92
|
+
{
|
|
93
|
+
name: "idx_user_likes_jukebox",
|
|
94
|
+
fields: [
|
|
95
|
+
{ name: "jukebox_id" },
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "idx_user_likes_playlist",
|
|
100
|
+
fields: [
|
|
101
|
+
{ name: "playlist_id" },
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "idx_user_likes_radio_show",
|
|
106
|
+
fields: [
|
|
107
|
+
{ name: "radio_show_id" },
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "idx_user_likes_user",
|
|
112
|
+
fields: [
|
|
113
|
+
{ name: "app_user_id" },
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "uq_user_likes_user_jukebox",
|
|
118
|
+
unique: true,
|
|
119
|
+
fields: [
|
|
120
|
+
{ name: "app_user_id" },
|
|
121
|
+
{ name: "jukebox_id" },
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "uq_user_likes_user_playlist",
|
|
126
|
+
unique: true,
|
|
127
|
+
fields: [
|
|
128
|
+
{ name: "app_user_id" },
|
|
129
|
+
{ name: "playlist_id" },
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "uq_user_likes_user_radio_show",
|
|
134
|
+
unique: true,
|
|
135
|
+
fields: [
|
|
136
|
+
{ name: "app_user_id" },
|
|
137
|
+
{ name: "radio_show_id" },
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "user_likes_pkey",
|
|
142
|
+
unique: true,
|
|
143
|
+
fields: [
|
|
144
|
+
{ name: "id" },
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.UserLikes = UserLikes;
|
package/dist/init-models.d.ts
CHANGED
|
@@ -165,10 +165,14 @@ import { UnmatchedAlbum as _UnmatchedAlbum } from "./UnmatchedAlbum";
|
|
|
165
165
|
import type { UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes } from "./UnmatchedAlbum";
|
|
166
166
|
import { UnmatchedArtist as _UnmatchedArtist } from "./UnmatchedArtist";
|
|
167
167
|
import type { UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes } from "./UnmatchedArtist";
|
|
168
|
+
import { UserComments as _UserComments } from "./UserComments";
|
|
169
|
+
import type { UserCommentsAttributes, UserCommentsCreationAttributes } from "./UserComments";
|
|
168
170
|
import { UserContacts as _UserContacts } from "./UserContacts";
|
|
169
171
|
import type { UserContactsAttributes, UserContactsCreationAttributes } from "./UserContacts";
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
import { UserLikes as _UserLikes } from "./UserLikes";
|
|
173
|
+
import type { UserLikesAttributes, UserLikesCreationAttributes } from "./UserLikes";
|
|
174
|
+
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, _GuestUser as GuestUser, _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, _MerchItem as MerchItem, _MerchOrchestration as MerchOrchestration, _MerchPlatform as MerchPlatform, _MerchType as MerchType, _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, _UserComments as UserComments, _UserContacts as UserContacts, _UserLikes as UserLikes, };
|
|
175
|
+
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, GuestUserAttributes, GuestUserCreationAttributes, 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, MerchItemAttributes, MerchItemCreationAttributes, MerchOrchestrationAttributes, MerchOrchestrationCreationAttributes, MerchPlatformAttributes, MerchPlatformCreationAttributes, MerchTypeAttributes, MerchTypeCreationAttributes, 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, UserCommentsAttributes, UserCommentsCreationAttributes, UserContactsAttributes, UserContactsCreationAttributes, UserLikesAttributes, UserLikesCreationAttributes, };
|
|
172
176
|
export declare function initModels(sequelize: Sequelize): {
|
|
173
177
|
AccessControlPreference: typeof _AccessControlPreference;
|
|
174
178
|
AppUser: typeof _AppUser;
|
|
@@ -253,5 +257,7 @@ export declare function initModels(sequelize: Sequelize): {
|
|
|
253
257
|
TrackDeletionReason: typeof _TrackDeletionReason;
|
|
254
258
|
UnmatchedAlbum: typeof _UnmatchedAlbum;
|
|
255
259
|
UnmatchedArtist: typeof _UnmatchedArtist;
|
|
260
|
+
UserComments: typeof _UserComments;
|
|
256
261
|
UserContacts: typeof _UserContacts;
|
|
262
|
+
UserLikes: typeof _UserLikes;
|
|
257
263
|
};
|
package/dist/init-models.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MetricsDaily = exports.MerchType = exports.MerchPlatform = exports.MerchOrchestration = exports.MerchItem = 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.GuestUser = 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 = exports.Notification = exports.NewsSite = exports.NewsPlatform = exports.NewsArticle = exports.MetricsEvent = void 0;
|
|
4
|
+
exports.UserLikes = exports.UserContacts = exports.UserComments = 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 = exports.Notification = exports.NewsSite = exports.NewsPlatform = exports.NewsArticle = exports.MetricsEvent = 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; } });
|
|
@@ -169,8 +169,12 @@ const UnmatchedAlbum_1 = require("./UnmatchedAlbum");
|
|
|
169
169
|
Object.defineProperty(exports, "UnmatchedAlbum", { enumerable: true, get: function () { return UnmatchedAlbum_1.UnmatchedAlbum; } });
|
|
170
170
|
const UnmatchedArtist_1 = require("./UnmatchedArtist");
|
|
171
171
|
Object.defineProperty(exports, "UnmatchedArtist", { enumerable: true, get: function () { return UnmatchedArtist_1.UnmatchedArtist; } });
|
|
172
|
+
const UserComments_1 = require("./UserComments");
|
|
173
|
+
Object.defineProperty(exports, "UserComments", { enumerable: true, get: function () { return UserComments_1.UserComments; } });
|
|
172
174
|
const UserContacts_1 = require("./UserContacts");
|
|
173
175
|
Object.defineProperty(exports, "UserContacts", { enumerable: true, get: function () { return UserContacts_1.UserContacts; } });
|
|
176
|
+
const UserLikes_1 = require("./UserLikes");
|
|
177
|
+
Object.defineProperty(exports, "UserLikes", { enumerable: true, get: function () { return UserLikes_1.UserLikes; } });
|
|
174
178
|
function initModels(sequelize) {
|
|
175
179
|
const AccessControlPreference = AccessControlPreference_1.AccessControlPreference.initModel(sequelize);
|
|
176
180
|
const AppUser = AppUser_1.AppUser.initModel(sequelize);
|
|
@@ -255,7 +259,9 @@ function initModels(sequelize) {
|
|
|
255
259
|
const TrackDeletionReason = TrackDeletionReason_1.TrackDeletionReason.initModel(sequelize);
|
|
256
260
|
const UnmatchedAlbum = UnmatchedAlbum_1.UnmatchedAlbum.initModel(sequelize);
|
|
257
261
|
const UnmatchedArtist = UnmatchedArtist_1.UnmatchedArtist.initModel(sequelize);
|
|
262
|
+
const UserComments = UserComments_1.UserComments.initModel(sequelize);
|
|
258
263
|
const UserContacts = UserContacts_1.UserContacts.initModel(sequelize);
|
|
264
|
+
const UserLikes = UserLikes_1.UserLikes.initModel(sequelize);
|
|
259
265
|
CanonAlbum.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
260
266
|
CanonAlbum.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferences', through: CanonAlbumExternalReferenceRelation, foreignKey: "canonAlbumId", otherKey: "externalReferenceId" });
|
|
261
267
|
CanonAlbum.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbums', through: CanonToPlatformAlbumRelation, foreignKey: "canonAlbumId", otherKey: "platformAlbumId" });
|
|
@@ -326,8 +332,12 @@ function initModels(sequelize) {
|
|
|
326
332
|
AppUser.hasMany(PlatformUserPlaylist, { as: "platformUserPlaylists", foreignKey: "appUserId" });
|
|
327
333
|
RadioShow.belongsTo(AppUser, { as: "creatorUser", foreignKey: "creatorUserId" });
|
|
328
334
|
AppUser.hasMany(RadioShow, { as: "radioShows", foreignKey: "creatorUserId" });
|
|
335
|
+
UserComments.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
336
|
+
AppUser.hasMany(UserComments, { as: "userComments", foreignKey: "appUserId" });
|
|
329
337
|
UserContacts.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
330
338
|
AppUser.hasMany(UserContacts, { as: "userContacts", foreignKey: "appUserId" });
|
|
339
|
+
UserLikes.belongsTo(AppUser, { as: "appUser", foreignKey: "appUserId" });
|
|
340
|
+
AppUser.hasMany(UserLikes, { as: "userLikes", foreignKey: "appUserId" });
|
|
331
341
|
CanonAlbumExternalReferenceRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
332
342
|
CanonAlbum.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "canonAlbumId" });
|
|
333
343
|
CanonAlbumImageHarvested.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
@@ -410,6 +420,10 @@ function initModels(sequelize) {
|
|
|
410
420
|
JukeboxSession.hasMany(JukeboxUser, { as: "jukeboxUsers", foreignKey: "jukeboxSessionId" });
|
|
411
421
|
Notification.belongsTo(JukeboxSession, { as: "jukeboxSession", foreignKey: "jukeboxSessionId" });
|
|
412
422
|
JukeboxSession.hasMany(Notification, { as: "notifications", foreignKey: "jukeboxSessionId" });
|
|
423
|
+
UserComments.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
424
|
+
JukeboxSession.hasMany(UserComments, { as: "userComments", foreignKey: "jukeboxId" });
|
|
425
|
+
UserLikes.belongsTo(JukeboxSession, { as: "jukebox", foreignKey: "jukeboxId" });
|
|
426
|
+
JukeboxSession.hasMany(UserLikes, { as: "userLikes", foreignKey: "jukeboxId" });
|
|
413
427
|
JukeboxSession.belongsTo(JukeboxStatus, { as: "jukeboxStatus", foreignKey: "jukeboxStatusId" });
|
|
414
428
|
JukeboxStatus.hasMany(JukeboxSession, { as: "jukeboxSessions", foreignKey: "jukeboxStatusId" });
|
|
415
429
|
JukeboxSession.belongsTo(JukeboxTerminationCondition, { as: "terminationCondition", foreignKey: "terminationConditionId" });
|
|
@@ -508,8 +522,12 @@ function initModels(sequelize) {
|
|
|
508
522
|
PlatformUserAlbum.hasMany(PlatformUserAlbumTrack, { as: "platformUserAlbumTracks", foreignKey: "platformUserAlbumId" });
|
|
509
523
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
510
524
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
511
|
-
|
|
512
|
-
|
|
525
|
+
UserComments.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
526
|
+
PlatformUserPlaylist.hasMany(UserComments, { as: "userComments", foreignKey: "playlistId" });
|
|
527
|
+
UserLikes.belongsTo(PlatformUserPlaylist, { as: "playlist", foreignKey: "playlistId" });
|
|
528
|
+
PlatformUserPlaylist.hasMany(UserLikes, { as: "userLikes", foreignKey: "playlistId" });
|
|
529
|
+
JukeboxQueueEntry.belongsTo(PlaybackStatusType, { as: "playbackStatusType", foreignKey: "playbackStatusTypeId" });
|
|
530
|
+
PlaybackStatusType.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "playbackStatusTypeId" });
|
|
513
531
|
RadioShowGenres.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
514
532
|
RadioShow.hasMany(RadioShowGenres, { as: "radioShowGenres", foreignKey: "radioShowId" });
|
|
515
533
|
RadioShowMedia.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
@@ -518,6 +536,10 @@ function initModels(sequelize) {
|
|
|
518
536
|
RadioShow.hasMany(RadioShowPlacement, { as: "radioShowPlacements", foreignKey: "radioShowId" });
|
|
519
537
|
RadioShowPublishRequests.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
520
538
|
RadioShow.hasMany(RadioShowPublishRequests, { as: "radioShowPublishRequests", foreignKey: "radioShowId" });
|
|
539
|
+
UserComments.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
540
|
+
RadioShow.hasMany(UserComments, { as: "userComments", foreignKey: "radioShowId" });
|
|
541
|
+
UserLikes.belongsTo(RadioShow, { as: "radioShow", foreignKey: "radioShowId" });
|
|
542
|
+
RadioShow.hasMany(UserLikes, { as: "userLikes", foreignKey: "radioShowId" });
|
|
521
543
|
AppUser.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
522
544
|
State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId" });
|
|
523
545
|
PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
@@ -526,6 +548,8 @@ function initModels(sequelize) {
|
|
|
526
548
|
State.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "stateId" });
|
|
527
549
|
JukeboxQueueEntry.belongsTo(TrackDeletionReason, { as: "trackDeletionReason", foreignKey: "trackDeletionReasonId" });
|
|
528
550
|
TrackDeletionReason.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "trackDeletionReasonId" });
|
|
551
|
+
UserComments.belongsTo(UserComments, { as: "replyComment", foreignKey: "replyCommentId" });
|
|
552
|
+
UserComments.hasMany(UserComments, { as: "userComments", foreignKey: "replyCommentId" });
|
|
529
553
|
return {
|
|
530
554
|
AccessControlPreference: AccessControlPreference,
|
|
531
555
|
AppUser: AppUser,
|
|
@@ -610,6 +634,8 @@ function initModels(sequelize) {
|
|
|
610
634
|
TrackDeletionReason: TrackDeletionReason,
|
|
611
635
|
UnmatchedAlbum: UnmatchedAlbum,
|
|
612
636
|
UnmatchedArtist: UnmatchedArtist,
|
|
637
|
+
UserComments: UserComments,
|
|
613
638
|
UserContacts: UserContacts,
|
|
639
|
+
UserLikes: UserLikes,
|
|
614
640
|
};
|
|
615
641
|
}
|
package/models/AppUser.ts
CHANGED
|
@@ -11,7 +11,9 @@ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum
|
|
|
11
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
12
12
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
13
13
|
import type { State, StateId } from './State';
|
|
14
|
+
import type { UserComments, UserCommentsId } from './UserComments';
|
|
14
15
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
16
|
+
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
15
17
|
|
|
16
18
|
export interface AppUserAttributes {
|
|
17
19
|
email: string;
|
|
@@ -196,6 +198,18 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
196
198
|
hasRadioShow!: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
|
|
197
199
|
hasRadioShows!: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
|
|
198
200
|
countRadioShows!: Sequelize.HasManyCountAssociationsMixin;
|
|
201
|
+
// AppUser hasMany UserComments via appUserId
|
|
202
|
+
userComments!: UserComments[];
|
|
203
|
+
getUserComments!: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
|
204
|
+
setUserComments!: Sequelize.HasManySetAssociationsMixin<UserComments, UserCommentsId>;
|
|
205
|
+
addUserComment!: Sequelize.HasManyAddAssociationMixin<UserComments, UserCommentsId>;
|
|
206
|
+
addUserComments!: Sequelize.HasManyAddAssociationsMixin<UserComments, UserCommentsId>;
|
|
207
|
+
createUserComment!: Sequelize.HasManyCreateAssociationMixin<UserComments>;
|
|
208
|
+
removeUserComment!: Sequelize.HasManyRemoveAssociationMixin<UserComments, UserCommentsId>;
|
|
209
|
+
removeUserComments!: Sequelize.HasManyRemoveAssociationsMixin<UserComments, UserCommentsId>;
|
|
210
|
+
hasUserComment!: Sequelize.HasManyHasAssociationMixin<UserComments, UserCommentsId>;
|
|
211
|
+
hasUserComments!: Sequelize.HasManyHasAssociationsMixin<UserComments, UserCommentsId>;
|
|
212
|
+
countUserComments!: Sequelize.HasManyCountAssociationsMixin;
|
|
199
213
|
// AppUser hasMany UserContacts via appUserId
|
|
200
214
|
userContacts!: UserContacts[];
|
|
201
215
|
getUserContacts!: Sequelize.HasManyGetAssociationsMixin<UserContacts>;
|
|
@@ -208,6 +222,18 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
208
222
|
hasUserContact!: Sequelize.HasManyHasAssociationMixin<UserContacts, UserContactsId>;
|
|
209
223
|
hasUserContacts!: Sequelize.HasManyHasAssociationsMixin<UserContacts, UserContactsId>;
|
|
210
224
|
countUserContacts!: Sequelize.HasManyCountAssociationsMixin;
|
|
225
|
+
// AppUser hasMany UserLikes via appUserId
|
|
226
|
+
userLikes!: UserLikes[];
|
|
227
|
+
getUserLikes!: Sequelize.HasManyGetAssociationsMixin<UserLikes>;
|
|
228
|
+
setUserLikes!: Sequelize.HasManySetAssociationsMixin<UserLikes, UserLikesId>;
|
|
229
|
+
addUserLike!: Sequelize.HasManyAddAssociationMixin<UserLikes, UserLikesId>;
|
|
230
|
+
addUserLikes!: Sequelize.HasManyAddAssociationsMixin<UserLikes, UserLikesId>;
|
|
231
|
+
createUserLike!: Sequelize.HasManyCreateAssociationMixin<UserLikes>;
|
|
232
|
+
removeUserLike!: Sequelize.HasManyRemoveAssociationMixin<UserLikes, UserLikesId>;
|
|
233
|
+
removeUserLikes!: Sequelize.HasManyRemoveAssociationsMixin<UserLikes, UserLikesId>;
|
|
234
|
+
hasUserLike!: Sequelize.HasManyHasAssociationMixin<UserLikes, UserLikesId>;
|
|
235
|
+
hasUserLikes!: Sequelize.HasManyHasAssociationsMixin<UserLikes, UserLikesId>;
|
|
236
|
+
countUserLikes!: Sequelize.HasManyCountAssociationsMixin;
|
|
211
237
|
// AppUser belongsTo State via stateId
|
|
212
238
|
state!: State;
|
|
213
239
|
getState!: Sequelize.BelongsToGetAssociationMixin<State>;
|