@earbug/db-models 0.0.6 → 0.0.8
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/AppUser.d.ts +5 -5
- package/dist/AppUser.js +13 -13
- package/dist/AppUserDevice.d.ts +4 -4
- package/dist/AppUserDevice.js +8 -8
- package/dist/AppUserFollowRelation.d.ts +3 -3
- package/dist/AppUserFollowRelation.js +6 -6
- package/dist/AppUserPlatformRelation.d.ts +7 -7
- package/dist/AppUserPlatformRelation.js +18 -18
- package/dist/CanonAlbum.d.ts +29 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonAlbumImageHarvested.d.ts +9 -9
- package/dist/CanonAlbumImageHarvested.js +24 -32
- package/dist/CanonAlbumTrackRelation.d.ts +10 -10
- package/dist/CanonAlbumTrackRelation.js +2 -2
- package/dist/CanonArtist.d.ts +14 -14
- package/dist/CanonArtist.js +6 -6
- package/dist/CanonArtistImageHarvested.d.ts +9 -9
- package/dist/CanonArtistImageHarvested.js +24 -24
- package/dist/CanonGenre.d.ts +3 -3
- package/dist/CanonGenre.js +6 -6
- package/dist/CanonLabel.d.ts +2 -2
- package/dist/CanonLabel.js +6 -6
- package/dist/CanonMember.d.ts +3 -3
- package/dist/CanonMember.js +6 -6
- package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
- package/dist/CanonMemberExternalReferenceRelation.js +5 -5
- package/dist/CanonTrack.d.ts +29 -5
- package/dist/CanonTrack.js +11 -11
- package/dist/ConfigParam.d.ts +2 -2
- package/dist/ConfigParam.js +5 -5
- package/dist/ExternalReference.d.ts +2 -2
- package/dist/ExternalReference.js +5 -5
- package/dist/JukeboxAccessType.d.ts +2 -2
- package/dist/JukeboxAccessType.js +4 -4
- package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
- package/dist/JukeboxCanonGenreRelation.js +6 -6
- package/dist/JukeboxInvite.d.ts +3 -3
- package/dist/JukeboxInvite.js +6 -6
- package/dist/JukeboxQueueEntry.d.ts +10 -10
- package/dist/JukeboxQueueEntry.js +12 -12
- package/dist/JukeboxQueueMode.d.ts +2 -2
- package/dist/JukeboxQueueMode.js +4 -4
- package/dist/JukeboxSession.d.ts +9 -9
- package/dist/JukeboxSession.js +20 -20
- package/dist/JukeboxTerminationCondition.d.ts +2 -2
- package/dist/JukeboxTerminationCondition.js +4 -4
- package/dist/JukeboxType.d.ts +2 -2
- package/dist/JukeboxType.js +4 -4
- package/dist/JukeboxUser.d.ts +7 -7
- package/dist/JukeboxUser.js +20 -20
- package/dist/KnexMigrations.d.ts +3 -3
- package/dist/KnexMigrations.js +6 -6
- package/dist/KnexMigrationsLock.d.ts +3 -3
- package/dist/KnexMigrationsLock.js +5 -5
- package/dist/MetricsDaily.d.ts +3 -3
- package/dist/MetricsDaily.js +4 -4
- package/dist/MetricsEvent.d.ts +5 -1
- package/dist/MetricsEvent.js +6 -0
- package/dist/NewsSite.d.ts +3 -3
- package/dist/NewsSite.js +6 -6
- package/dist/Platform.d.ts +2 -2
- package/dist/Platform.js +7 -7
- package/dist/PlatformAlbum.d.ts +5 -28
- package/dist/PlatformAlbum.js +10 -10
- package/dist/PlatformArtist.d.ts +5 -5
- package/dist/PlatformArtist.js +10 -10
- package/dist/PlatformGenre.d.ts +2 -2
- package/dist/PlatformGenre.js +6 -6
- package/dist/PlatformTrack.d.ts +3 -26
- package/dist/PlatformTrack.js +6 -6
- package/dist/PlatformUserAlbum.d.ts +2 -2
- package/dist/PlatformUserAlbum.js +6 -6
- package/dist/PlatformUserAlbumTrack.d.ts +4 -4
- package/dist/PlatformUserAlbumTrack.js +11 -11
- package/dist/PlatformUserPlaylist.d.ts +5 -5
- package/dist/PlatformUserPlaylist.js +11 -11
- package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
- package/dist/PlatformUserPlaylistTrack.js +17 -17
- package/dist/PlaybackStatus.d.ts +2 -14
- package/dist/PlaybackStatus.js +4 -4
- package/dist/PlaybackStatusType.d.ts +12 -0
- package/dist/State.d.ts +2 -2
- package/dist/State.js +4 -4
- package/dist/UnmatchedAlbum.d.ts +2 -2
- package/dist/UnmatchedAlbum.js +6 -6
- package/dist/UnmatchedArtist.d.ts +2 -2
- package/dist/UnmatchedArtist.js +6 -6
- package/dist/UserContacts.d.ts +3 -3
- package/dist/UserContacts.js +7 -7
- package/dist/init-models.js +9 -9
- package/models/AppUser.ts +18 -18
- package/models/AppUserDevice.ts +12 -12
- package/models/AppUserFollowRelation.ts +9 -9
- package/models/AppUserPlatformRelation.ts +25 -25
- package/models/CanonAlbum.ts +41 -15
- package/models/CanonAlbumImageHarvested.ts +33 -41
- package/models/CanonAlbumTrackRelation.ts +14 -14
- package/models/CanonArtist.ts +20 -20
- package/models/CanonArtistImageHarvested.ts +33 -33
- package/models/CanonGenre.ts +9 -9
- package/models/CanonLabel.ts +8 -8
- package/models/CanonMember.ts +9 -9
- package/models/CanonMemberExternalReferenceRelation.ts +7 -7
- package/models/CanonTrack.ts +42 -16
- package/models/ConfigParam.ts +7 -7
- package/models/ExternalReference.ts +7 -7
- package/models/JukeboxAccessType.ts +6 -6
- package/models/JukeboxCanonGenreRelation.ts +8 -8
- package/models/JukeboxInvite.ts +9 -9
- package/models/JukeboxQueueEntry.ts +23 -23
- package/models/JukeboxQueueMode.ts +6 -6
- package/models/JukeboxSession.ts +29 -29
- package/models/JukeboxTerminationCondition.ts +6 -6
- package/models/JukeboxType.ts +6 -6
- package/models/JukeboxUser.ts +27 -27
- package/models/KnexMigrations.ts +9 -9
- package/models/KnexMigrationsLock.ts +8 -8
- package/models/MetricsDaily.ts +7 -7
- package/models/MetricsEvent.ts +11 -1
- package/models/NewsSite.ts +9 -9
- package/models/Platform.ts +9 -9
- package/models/PlatformAlbum.ts +15 -40
- package/models/PlatformArtist.ts +15 -15
- package/models/PlatformGenre.ts +8 -8
- package/models/PlatformTrack.ts +9 -34
- package/models/PlatformUserAlbum.ts +8 -8
- package/models/PlatformUserAlbumTrack.ts +15 -15
- package/models/PlatformUserPlaylist.ts +16 -16
- package/models/PlatformUserPlaylistTrack.ts +24 -24
- package/models/PlaybackStatus.ts +6 -19
- package/models/PlaybackStatusType.ts +13 -0
- package/models/State.ts +6 -6
- package/models/UnmatchedAlbum.ts +8 -8
- package/models/UnmatchedArtist.ts +8 -8
- package/models/UserContacts.ts +10 -10
- package/models/init-models.ts +9 -9
- package/package.json +1 -1
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class PlatformUserPlaylist extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return PlatformUserPlaylist.init({
|
|
32
|
-
id: {
|
|
33
|
-
type: sequelize_1.DataTypes.UUID,
|
|
34
|
-
allowNull: false,
|
|
35
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
36
|
-
primaryKey: true
|
|
37
|
-
},
|
|
38
32
|
appUserId: {
|
|
39
33
|
type: sequelize_1.DataTypes.UUID,
|
|
40
34
|
allowNull: false,
|
|
@@ -69,16 +63,22 @@ class PlatformUserPlaylist extends sequelize_1.Model {
|
|
|
69
63
|
type: sequelize_1.DataTypes.TEXT,
|
|
70
64
|
allowNull: true
|
|
71
65
|
},
|
|
72
|
-
public: {
|
|
73
|
-
type: sequelize_1.DataTypes.BOOLEAN,
|
|
74
|
-
allowNull: true,
|
|
75
|
-
defaultValue: false
|
|
76
|
-
},
|
|
77
66
|
snapshotId: {
|
|
78
67
|
type: sequelize_1.DataTypes.TEXT,
|
|
79
68
|
allowNull: false,
|
|
80
69
|
field: 'snapshot_id'
|
|
81
70
|
},
|
|
71
|
+
id: {
|
|
72
|
+
type: sequelize_1.DataTypes.UUID,
|
|
73
|
+
allowNull: false,
|
|
74
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
75
|
+
primaryKey: true
|
|
76
|
+
},
|
|
77
|
+
public: {
|
|
78
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
79
|
+
allowNull: true,
|
|
80
|
+
defaultValue: false
|
|
81
|
+
},
|
|
82
82
|
collaborative: {
|
|
83
83
|
type: sequelize_1.DataTypes.BOOLEAN,
|
|
84
84
|
allowNull: false,
|
|
@@ -4,34 +4,34 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
|
4
4
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
5
5
|
import type { State, StateId } from './State';
|
|
6
6
|
export interface PlatformUserPlaylistTrackAttributes {
|
|
7
|
-
id: string;
|
|
8
7
|
platformTrackId: string;
|
|
9
8
|
platformUserPlaylistId: string;
|
|
10
|
-
trackPosition: number;
|
|
11
9
|
addedDate?: Date;
|
|
12
10
|
addedByPlatformUserId?: string;
|
|
11
|
+
externalPlaylistTrackId: string;
|
|
12
|
+
id: string;
|
|
13
|
+
trackPosition: number;
|
|
13
14
|
isLocal: boolean;
|
|
14
15
|
createDate: Date;
|
|
15
16
|
updateDate: Date;
|
|
16
17
|
stateId: number;
|
|
17
|
-
externalPlaylistTrackId: string;
|
|
18
18
|
}
|
|
19
19
|
export type PlatformUserPlaylistTrackPk = "id";
|
|
20
20
|
export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
|
|
21
|
-
export type PlatformUserPlaylistTrackOptionalAttributes = "
|
|
21
|
+
export type PlatformUserPlaylistTrackOptionalAttributes = "addedDate" | "addedByPlatformUserId" | "id" | "trackPosition" | "createDate" | "updateDate" | "stateId";
|
|
22
22
|
export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
|
|
23
23
|
export declare class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
|
|
24
|
-
id: string;
|
|
25
24
|
platformTrackId: string;
|
|
26
25
|
platformUserPlaylistId: string;
|
|
27
|
-
trackPosition: number;
|
|
28
26
|
addedDate?: Date;
|
|
29
27
|
addedByPlatformUserId?: string;
|
|
28
|
+
externalPlaylistTrackId: string;
|
|
29
|
+
id: string;
|
|
30
|
+
trackPosition: number;
|
|
30
31
|
isLocal: boolean;
|
|
31
32
|
createDate: Date;
|
|
32
33
|
updateDate: Date;
|
|
33
34
|
stateId: number;
|
|
34
|
-
externalPlaylistTrackId: string;
|
|
35
35
|
platformTrack: PlatformTrack;
|
|
36
36
|
getPlatformTrack: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
|
|
37
37
|
setPlatformTrack: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
|
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class PlatformUserPlaylistTrack extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return PlatformUserPlaylistTrack.init({
|
|
32
|
-
id: {
|
|
33
|
-
type: sequelize_1.DataTypes.UUID,
|
|
34
|
-
allowNull: false,
|
|
35
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
36
|
-
primaryKey: true
|
|
37
|
-
},
|
|
38
32
|
platformTrackId: {
|
|
39
33
|
type: sequelize_1.DataTypes.UUID,
|
|
40
34
|
allowNull: false,
|
|
@@ -55,12 +49,6 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
|
|
|
55
49
|
unique: "uk_playlist_id_track_id",
|
|
56
50
|
field: 'platform_user_playlist_id'
|
|
57
51
|
},
|
|
58
|
-
trackPosition: {
|
|
59
|
-
type: sequelize_1.DataTypes.INTEGER,
|
|
60
|
-
allowNull: false,
|
|
61
|
-
defaultValue: 0,
|
|
62
|
-
field: 'track_position'
|
|
63
|
-
},
|
|
64
52
|
addedDate: {
|
|
65
53
|
type: sequelize_1.DataTypes.DATE,
|
|
66
54
|
allowNull: true,
|
|
@@ -71,6 +59,23 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
|
|
|
71
59
|
allowNull: true,
|
|
72
60
|
field: 'added_by_platform_user_id'
|
|
73
61
|
},
|
|
62
|
+
externalPlaylistTrackId: {
|
|
63
|
+
type: sequelize_1.DataTypes.STRING(255),
|
|
64
|
+
allowNull: false,
|
|
65
|
+
field: 'external_playlist_track_id'
|
|
66
|
+
},
|
|
67
|
+
id: {
|
|
68
|
+
type: sequelize_1.DataTypes.UUID,
|
|
69
|
+
allowNull: false,
|
|
70
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
71
|
+
primaryKey: true
|
|
72
|
+
},
|
|
73
|
+
trackPosition: {
|
|
74
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
75
|
+
allowNull: false,
|
|
76
|
+
defaultValue: 0,
|
|
77
|
+
field: 'track_position'
|
|
78
|
+
},
|
|
74
79
|
isLocal: {
|
|
75
80
|
type: sequelize_1.DataTypes.BOOLEAN,
|
|
76
81
|
allowNull: false,
|
|
@@ -98,11 +103,6 @@ class PlatformUserPlaylistTrack extends sequelize_1.Model {
|
|
|
98
103
|
key: 'id'
|
|
99
104
|
},
|
|
100
105
|
field: 'state_id'
|
|
101
|
-
},
|
|
102
|
-
externalPlaylistTrackId: {
|
|
103
|
-
type: sequelize_1.DataTypes.STRING(255),
|
|
104
|
-
allowNull: false,
|
|
105
|
-
field: 'external_playlist_track_id'
|
|
106
106
|
}
|
|
107
107
|
}, {
|
|
108
108
|
sequelize,
|
package/dist/PlaybackStatus.d.ts
CHANGED
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
4
3
|
export interface PlaybackStatusAttributes {
|
|
5
|
-
id: number;
|
|
6
4
|
description: string;
|
|
5
|
+
id: number;
|
|
7
6
|
}
|
|
8
7
|
export type PlaybackStatusPk = "id";
|
|
9
8
|
export type PlaybackStatusId = PlaybackStatus[PlaybackStatusPk];
|
|
10
9
|
export type PlaybackStatusCreationAttributes = PlaybackStatusAttributes;
|
|
11
10
|
export declare class PlaybackStatus extends Model<PlaybackStatusAttributes, PlaybackStatusCreationAttributes> implements PlaybackStatusAttributes {
|
|
12
|
-
id: number;
|
|
13
11
|
description: string;
|
|
14
|
-
|
|
15
|
-
getJukeboxQueueEntries: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
|
|
16
|
-
setJukeboxQueueEntries: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
17
|
-
addJukeboxQueueEntry: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
18
|
-
addJukeboxQueueEntries: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
19
|
-
createJukeboxQueueEntry: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
|
|
20
|
-
removeJukeboxQueueEntry: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
21
|
-
removeJukeboxQueueEntries: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
22
|
-
hasJukeboxQueueEntry: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
23
|
-
hasJukeboxQueueEntries: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
24
|
-
countJukeboxQueueEntries: Sequelize.HasManyCountAssociationsMixin;
|
|
12
|
+
id: number;
|
|
25
13
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatus;
|
|
26
14
|
}
|
package/dist/PlaybackStatus.js
CHANGED
|
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
|
|
|
5
5
|
class PlaybackStatus extends sequelize_1.Model {
|
|
6
6
|
static initModel(sequelize) {
|
|
7
7
|
return PlaybackStatus.init({
|
|
8
|
+
description: {
|
|
9
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
10
|
+
allowNull: false
|
|
11
|
+
},
|
|
8
12
|
id: {
|
|
9
13
|
autoIncrement: true,
|
|
10
14
|
autoIncrementIdentity: true,
|
|
11
15
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
12
16
|
allowNull: false,
|
|
13
17
|
primaryKey: true
|
|
14
|
-
},
|
|
15
|
-
description: {
|
|
16
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
17
|
-
allowNull: false
|
|
18
18
|
}
|
|
19
19
|
}, {
|
|
20
20
|
sequelize,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
+
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
3
4
|
export interface PlaybackStatusTypeAttributes {
|
|
4
5
|
id: number;
|
|
5
6
|
description: string;
|
|
@@ -10,5 +11,16 @@ export type PlaybackStatusTypeCreationAttributes = PlaybackStatusTypeAttributes;
|
|
|
10
11
|
export declare class PlaybackStatusType extends Model<PlaybackStatusTypeAttributes, PlaybackStatusTypeCreationAttributes> implements PlaybackStatusTypeAttributes {
|
|
11
12
|
id: number;
|
|
12
13
|
description: string;
|
|
14
|
+
jukeboxQueueEntries: JukeboxQueueEntry[];
|
|
15
|
+
getJukeboxQueueEntries: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
|
|
16
|
+
setJukeboxQueueEntries: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
17
|
+
addJukeboxQueueEntry: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
18
|
+
addJukeboxQueueEntries: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
19
|
+
createJukeboxQueueEntry: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
|
|
20
|
+
removeJukeboxQueueEntry: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
21
|
+
removeJukeboxQueueEntries: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
22
|
+
hasJukeboxQueueEntry: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
23
|
+
hasJukeboxQueueEntries: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
24
|
+
countJukeboxQueueEntries: Sequelize.HasManyCountAssociationsMixin;
|
|
13
25
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatusType;
|
|
14
26
|
}
|
package/dist/State.d.ts
CHANGED
|
@@ -4,15 +4,15 @@ import type { AppUser, AppUserId } from './AppUser';
|
|
|
4
4
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
5
5
|
import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
|
|
6
6
|
export interface StateAttributes {
|
|
7
|
-
id: number;
|
|
8
7
|
description: string;
|
|
8
|
+
id: number;
|
|
9
9
|
}
|
|
10
10
|
export type StatePk = "id";
|
|
11
11
|
export type StateId = State[StatePk];
|
|
12
12
|
export type StateCreationAttributes = StateAttributes;
|
|
13
13
|
export declare class State extends Model<StateAttributes, StateCreationAttributes> implements StateAttributes {
|
|
14
|
-
id: number;
|
|
15
14
|
description: string;
|
|
15
|
+
id: number;
|
|
16
16
|
appUsers: AppUser[];
|
|
17
17
|
getAppUsers: Sequelize.HasManyGetAssociationsMixin<AppUser>;
|
|
18
18
|
setAppUsers: Sequelize.HasManySetAssociationsMixin<AppUser, AppUserId>;
|
package/dist/State.js
CHANGED
|
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
|
|
|
5
5
|
class State extends sequelize_1.Model {
|
|
6
6
|
static initModel(sequelize) {
|
|
7
7
|
return State.init({
|
|
8
|
+
description: {
|
|
9
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
10
|
+
allowNull: false
|
|
11
|
+
},
|
|
8
12
|
id: {
|
|
9
13
|
autoIncrement: true,
|
|
10
14
|
autoIncrementIdentity: true,
|
|
11
15
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
12
16
|
allowNull: false,
|
|
13
17
|
primaryKey: true
|
|
14
|
-
},
|
|
15
|
-
description: {
|
|
16
|
-
type: sequelize_1.DataTypes.TEXT,
|
|
17
|
-
allowNull: false
|
|
18
18
|
}
|
|
19
19
|
}, {
|
|
20
20
|
sequelize,
|
package/dist/UnmatchedAlbum.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
4
4
|
export interface UnmatchedAlbumAttributes {
|
|
5
|
-
id: string;
|
|
6
5
|
platformAlbumId: string;
|
|
6
|
+
id: string;
|
|
7
7
|
createDate: Date;
|
|
8
8
|
}
|
|
9
9
|
export type UnmatchedAlbumPk = "id";
|
|
@@ -11,8 +11,8 @@ export type UnmatchedAlbumId = UnmatchedAlbum[UnmatchedAlbumPk];
|
|
|
11
11
|
export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
|
|
12
12
|
export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
|
|
13
13
|
export declare class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
|
|
14
|
-
id: string;
|
|
15
14
|
platformAlbumId: string;
|
|
15
|
+
id: string;
|
|
16
16
|
createDate: Date;
|
|
17
17
|
platformAlbum: PlatformAlbum;
|
|
18
18
|
getPlatformAlbum: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
|
package/dist/UnmatchedAlbum.js
CHANGED
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class UnmatchedAlbum extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return UnmatchedAlbum.init({
|
|
32
|
-
id: {
|
|
33
|
-
type: sequelize_1.DataTypes.UUID,
|
|
34
|
-
allowNull: false,
|
|
35
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
36
|
-
primaryKey: true
|
|
37
|
-
},
|
|
38
32
|
platformAlbumId: {
|
|
39
33
|
type: sequelize_1.DataTypes.UUID,
|
|
40
34
|
allowNull: false,
|
|
@@ -44,6 +38,12 @@ class UnmatchedAlbum extends sequelize_1.Model {
|
|
|
44
38
|
},
|
|
45
39
|
field: 'platform_album_id'
|
|
46
40
|
},
|
|
41
|
+
id: {
|
|
42
|
+
type: sequelize_1.DataTypes.UUID,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
45
|
+
primaryKey: true
|
|
46
|
+
},
|
|
47
47
|
createDate: {
|
|
48
48
|
type: sequelize_1.DataTypes.DATE,
|
|
49
49
|
allowNull: false,
|
|
@@ -2,9 +2,9 @@ import * as Sequelize from 'sequelize';
|
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
3
|
import type { Platform, PlatformId } from './Platform';
|
|
4
4
|
export interface UnmatchedArtistAttributes {
|
|
5
|
-
id: string;
|
|
6
5
|
platformId: number;
|
|
7
6
|
externalArtistId: number;
|
|
7
|
+
id: string;
|
|
8
8
|
createDate: Date;
|
|
9
9
|
updateDate: Date;
|
|
10
10
|
}
|
|
@@ -13,9 +13,9 @@ export type UnmatchedArtistId = UnmatchedArtist[UnmatchedArtistPk];
|
|
|
13
13
|
export type UnmatchedArtistOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
14
14
|
export type UnmatchedArtistCreationAttributes = Optional<UnmatchedArtistAttributes, UnmatchedArtistOptionalAttributes>;
|
|
15
15
|
export declare class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes> implements UnmatchedArtistAttributes {
|
|
16
|
-
id: string;
|
|
17
16
|
platformId: number;
|
|
18
17
|
externalArtistId: number;
|
|
18
|
+
id: string;
|
|
19
19
|
createDate: Date;
|
|
20
20
|
updateDate: Date;
|
|
21
21
|
platform: Platform;
|
package/dist/UnmatchedArtist.js
CHANGED
|
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
|
|
|
29
29
|
class UnmatchedArtist extends sequelize_1.Model {
|
|
30
30
|
static initModel(sequelize) {
|
|
31
31
|
return UnmatchedArtist.init({
|
|
32
|
-
id: {
|
|
33
|
-
type: sequelize_1.DataTypes.UUID,
|
|
34
|
-
allowNull: false,
|
|
35
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
36
|
-
primaryKey: true
|
|
37
|
-
},
|
|
38
32
|
platformId: {
|
|
39
33
|
type: sequelize_1.DataTypes.SMALLINT,
|
|
40
34
|
allowNull: false,
|
|
@@ -49,6 +43,12 @@ class UnmatchedArtist extends sequelize_1.Model {
|
|
|
49
43
|
allowNull: false,
|
|
50
44
|
field: 'external_artist_id'
|
|
51
45
|
},
|
|
46
|
+
id: {
|
|
47
|
+
type: sequelize_1.DataTypes.UUID,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
50
|
+
primaryKey: true
|
|
51
|
+
},
|
|
52
52
|
createDate: {
|
|
53
53
|
type: sequelize_1.DataTypes.DATE,
|
|
54
54
|
allowNull: false,
|
package/dist/UserContacts.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { AppUser, AppUserId } from './AppUser';
|
|
4
4
|
export interface UserContactsAttributes {
|
|
5
5
|
appUserId: string;
|
|
6
|
-
contactId: string;
|
|
7
6
|
contactAppUserId?: string;
|
|
8
7
|
firstName?: string;
|
|
9
8
|
lastName?: string;
|
|
@@ -17,14 +16,14 @@ export interface UserContactsAttributes {
|
|
|
17
16
|
contactPhone3?: string;
|
|
18
17
|
contactPhone3Type?: "mobile" | "work" | "home" | "main";
|
|
19
18
|
active?: boolean;
|
|
19
|
+
contactId: string;
|
|
20
20
|
}
|
|
21
21
|
export type UserContactsPk = "contactId";
|
|
22
22
|
export type UserContactsId = UserContacts[UserContactsPk];
|
|
23
|
-
export type UserContactsOptionalAttributes = "
|
|
23
|
+
export type UserContactsOptionalAttributes = "contactAppUserId" | "firstName" | "lastName" | "contactEmail1" | "contactEmail2" | "contactEmail3" | "contactPhone1" | "contactPhone1Type" | "contactPhone2" | "contactPhone2Type" | "contactPhone3" | "contactPhone3Type" | "active" | "contactId";
|
|
24
24
|
export type UserContactsCreationAttributes = Optional<UserContactsAttributes, UserContactsOptionalAttributes>;
|
|
25
25
|
export declare class UserContacts extends Model<UserContactsAttributes, UserContactsCreationAttributes> implements UserContactsAttributes {
|
|
26
26
|
appUserId: string;
|
|
27
|
-
contactId: string;
|
|
28
27
|
contactAppUserId?: string;
|
|
29
28
|
firstName?: string;
|
|
30
29
|
lastName?: string;
|
|
@@ -38,6 +37,7 @@ export declare class UserContacts extends Model<UserContactsAttributes, UserCont
|
|
|
38
37
|
contactPhone3?: string;
|
|
39
38
|
contactPhone3Type?: "mobile" | "work" | "home" | "main";
|
|
40
39
|
active?: boolean;
|
|
40
|
+
contactId: string;
|
|
41
41
|
appUser: AppUser;
|
|
42
42
|
getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
43
43
|
setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
package/dist/UserContacts.js
CHANGED
|
@@ -14,13 +14,6 @@ class UserContacts extends sequelize_1.Model {
|
|
|
14
14
|
},
|
|
15
15
|
field: 'app_user_id'
|
|
16
16
|
},
|
|
17
|
-
contactId: {
|
|
18
|
-
type: sequelize_1.DataTypes.UUID,
|
|
19
|
-
allowNull: false,
|
|
20
|
-
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
21
|
-
primaryKey: true,
|
|
22
|
-
field: 'contact_id'
|
|
23
|
-
},
|
|
24
17
|
contactAppUserId: {
|
|
25
18
|
type: sequelize_1.DataTypes.UUID,
|
|
26
19
|
allowNull: true,
|
|
@@ -84,6 +77,13 @@ class UserContacts extends sequelize_1.Model {
|
|
|
84
77
|
active: {
|
|
85
78
|
type: sequelize_1.DataTypes.BOOLEAN,
|
|
86
79
|
allowNull: true
|
|
80
|
+
},
|
|
81
|
+
contactId: {
|
|
82
|
+
type: sequelize_1.DataTypes.UUID,
|
|
83
|
+
allowNull: false,
|
|
84
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
85
|
+
primaryKey: true,
|
|
86
|
+
field: 'contact_id'
|
|
87
87
|
}
|
|
88
88
|
}, {
|
|
89
89
|
sequelize,
|
package/dist/init-models.js
CHANGED
|
@@ -211,9 +211,10 @@ function initModels(sequelize) {
|
|
|
211
211
|
const UnmatchedAlbum = UnmatchedAlbum_1.UnmatchedAlbum.initModel(sequelize);
|
|
212
212
|
const UnmatchedArtist = UnmatchedArtist_1.UnmatchedArtist.initModel(sequelize);
|
|
213
213
|
const UserContacts = UserContacts_1.UserContacts.initModel(sequelize);
|
|
214
|
+
CanonAlbum.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
214
215
|
CanonAlbum.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferences', through: CanonAlbumExternalReferenceRelation, foreignKey: "canonAlbumId", otherKey: "externalReferenceId" });
|
|
215
216
|
CanonAlbum.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbums', through: CanonToPlatformAlbumRelation, foreignKey: "canonAlbumId", otherKey: "platformAlbumId" });
|
|
216
|
-
CanonArtist.belongsToMany(CanonTrack, { as: '
|
|
217
|
+
CanonArtist.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTrackCanonArtistTrackRelations', through: CanonArtistTrackRelation, foreignKey: "canonArtistId", otherKey: "canonTrackId" });
|
|
217
218
|
CanonArtist.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonArtistAlbumRelations', through: CanonArtistAlbumRelation, foreignKey: "canonArtistId", otherKey: "canonAlbumId" });
|
|
218
219
|
CanonArtist.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtists', through: CanonToPlatformArtistRelation, foreignKey: "canonArtistId", otherKey: "platformArtistId" });
|
|
219
220
|
CanonGenre.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonGenreExternalReferenceRelations', through: CanonGenreExternalReferenceRelation, foreignKey: "canonGenreId", otherKey: "externalReferenceId" });
|
|
@@ -224,6 +225,7 @@ function initModels(sequelize) {
|
|
|
224
225
|
CanonLabel.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumLabelRelations', through: CanonAlbumLabelRelation, foreignKey: "canonLabelId", otherKey: "canonAlbumId" });
|
|
225
226
|
CanonMember.belongsToMany(ExternalReference, { as: 'externalReferenceIdExternalReferenceCanonMemberExternalReferenceRelations', through: CanonMemberExternalReferenceRelation, foreignKey: "canonMemberId", otherKey: "externalReferenceId" });
|
|
226
227
|
CanonMember.belongsToMany(PlatformArtist, { as: 'canonArtistIdPlatformArtistCanonArtistMemberRelations', through: CanonArtistMemberRelation, foreignKey: "canonMemberId", otherKey: "canonArtistId" });
|
|
228
|
+
CanonTrack.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
227
229
|
CanonTrack.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonArtistTrackRelations', through: CanonArtistTrackRelation, foreignKey: "canonTrackId", otherKey: "canonArtistId" });
|
|
228
230
|
CanonTrack.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTracks', through: CanonToPlatformTrackRelation, foreignKey: "canonTrackId", otherKey: "platformTrackId" });
|
|
229
231
|
ExternalReference.belongsToMany(CanonAlbum, { as: 'canonAlbumIdCanonAlbums', through: CanonAlbumExternalReferenceRelation, foreignKey: "externalReferenceId", otherKey: "canonAlbumId" });
|
|
@@ -237,7 +239,6 @@ function initModels(sequelize) {
|
|
|
237
239
|
PlatformAlbum.belongsToMany(CanonLabel, { as: 'canonLabelIdCanonLabels', through: CanonAlbumLabelRelation, foreignKey: "canonAlbumId", otherKey: "canonLabelId" });
|
|
238
240
|
PlatformAlbum.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistAlbumRelations', through: PlatformArtistAlbumRelation, foreignKey: "platformAlbumId", otherKey: "platformArtistId" });
|
|
239
241
|
PlatformAlbum.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformAlbumGenreRelations', through: PlatformAlbumGenreRelation, foreignKey: "platformAlbumId", otherKey: "platformGenreId" });
|
|
240
|
-
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'canonTrackIdPlatformTracks', through: CanonAlbumTrackRelation, foreignKey: "canonAlbumId", otherKey: "canonTrackId" });
|
|
241
242
|
PlatformAlbum.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformAlbumId", otherKey: "platformTrackId" });
|
|
242
243
|
PlatformArtist.belongsToMany(CanonArtist, { as: 'canonArtistIdCanonArtistCanonToPlatformArtistRelations', through: CanonToPlatformArtistRelation, foreignKey: "platformArtistId", otherKey: "canonArtistId" });
|
|
243
244
|
PlatformArtist.belongsToMany(CanonGenre, { as: 'canonGenreIdCanonGenreCanonArtistGenreRelations', through: CanonArtistGenreRelation, foreignKey: "canonArtistId", otherKey: "canonGenreId" });
|
|
@@ -251,7 +252,6 @@ function initModels(sequelize) {
|
|
|
251
252
|
PlatformGenre.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistGenreRelations', through: PlatformArtistGenreRelation, foreignKey: "platformGenreId", otherKey: "platformArtistId" });
|
|
252
253
|
PlatformGenre.belongsToMany(PlatformTrack, { as: 'platformTrackIdPlatformTrackPlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformGenreId", otherKey: "platformTrackId" });
|
|
253
254
|
PlatformTrack.belongsToMany(CanonTrack, { as: 'canonTrackIdCanonTrackCanonToPlatformTrackRelations', through: CanonToPlatformTrackRelation, foreignKey: "platformTrackId", otherKey: "canonTrackId" });
|
|
254
|
-
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'canonAlbumIdPlatformAlbumCanonAlbumTrackRelations', through: CanonAlbumTrackRelation, foreignKey: "canonTrackId", otherKey: "canonAlbumId" });
|
|
255
255
|
PlatformTrack.belongsToMany(PlatformAlbum, { as: 'platformAlbumIdPlatformAlbumPlatformAlbumTrackRelations', through: PlatformAlbumTrackRelation, foreignKey: "platformTrackId", otherKey: "platformAlbumId" });
|
|
256
256
|
PlatformTrack.belongsToMany(PlatformArtist, { as: 'platformArtistIdPlatformArtistPlatformArtistTrackRelations', through: PlatformArtistTrackRelation, foreignKey: "platformTrackId", otherKey: "platformArtistId" });
|
|
257
257
|
PlatformTrack.belongsToMany(PlatformGenre, { as: 'platformGenreIdPlatformGenrePlatformTrackGenreRelations', through: PlatformTrackGenreRelation, foreignKey: "platformTrackId", otherKey: "platformGenreId" });
|
|
@@ -281,6 +281,8 @@ function initModels(sequelize) {
|
|
|
281
281
|
CanonAlbum.hasMany(CanonAlbumExternalReferenceRelation, { as: "canonAlbumExternalReferenceRelations", foreignKey: "canonAlbumId" });
|
|
282
282
|
CanonAlbumImageHarvested.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
283
283
|
CanonAlbum.hasMany(CanonAlbumImageHarvested, { as: "canonAlbumImageHarvesteds", foreignKey: "canonAlbumId" });
|
|
284
|
+
CanonAlbumTrackRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
285
|
+
CanonAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId" });
|
|
284
286
|
CanonToPlatformAlbumRelation.belongsTo(CanonAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
285
287
|
CanonAlbum.hasMany(CanonToPlatformAlbumRelation, { as: "canonToPlatformAlbumRelations", foreignKey: "canonAlbumId" });
|
|
286
288
|
CanonArtistAlbumRelation.belongsTo(CanonArtist, { as: "canonArtist", foreignKey: "canonArtistId" });
|
|
@@ -309,6 +311,8 @@ function initModels(sequelize) {
|
|
|
309
311
|
CanonMember.hasMany(CanonArtistMemberRelation, { as: "canonArtistMemberRelations", foreignKey: "canonMemberId" });
|
|
310
312
|
CanonMemberExternalReferenceRelation.belongsTo(CanonMember, { as: "canonMember", foreignKey: "canonMemberId" });
|
|
311
313
|
CanonMember.hasMany(CanonMemberExternalReferenceRelation, { as: "canonMemberExternalReferenceRelations", foreignKey: "canonMemberId" });
|
|
314
|
+
CanonAlbumTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
315
|
+
CanonTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId" });
|
|
312
316
|
CanonArtistTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
313
317
|
CanonTrack.hasMany(CanonArtistTrackRelation, { as: "canonArtistTrackRelations", foreignKey: "canonTrackId" });
|
|
314
318
|
CanonToPlatformTrackRelation.belongsTo(CanonTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
@@ -371,8 +375,6 @@ function initModels(sequelize) {
|
|
|
371
375
|
PlatformAlbum.hasMany(CanonAlbumGenreRelation, { as: "canonAlbumGenreRelations", foreignKey: "canonAlbumId" });
|
|
372
376
|
CanonAlbumLabelRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
373
377
|
PlatformAlbum.hasMany(CanonAlbumLabelRelation, { as: "canonAlbumLabelRelations", foreignKey: "canonAlbumId" });
|
|
374
|
-
CanonAlbumTrackRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
375
|
-
PlatformAlbum.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonAlbumId" });
|
|
376
378
|
CanonArtistAlbumRelation.belongsTo(PlatformAlbum, { as: "canonAlbum", foreignKey: "canonAlbumId" });
|
|
377
379
|
PlatformAlbum.hasMany(CanonArtistAlbumRelation, { as: "canonArtistAlbumRelations", foreignKey: "canonAlbumId" });
|
|
378
380
|
CanonToPlatformAlbumRelation.belongsTo(PlatformAlbum, { as: "platformAlbum", foreignKey: "platformAlbumId" });
|
|
@@ -409,8 +411,6 @@ function initModels(sequelize) {
|
|
|
409
411
|
PlatformGenre.hasMany(PlatformArtistGenreRelation, { as: "platformArtistGenreRelations", foreignKey: "platformGenreId" });
|
|
410
412
|
PlatformTrackGenreRelation.belongsTo(PlatformGenre, { as: "platformGenre", foreignKey: "platformGenreId" });
|
|
411
413
|
PlatformGenre.hasMany(PlatformTrackGenreRelation, { as: "platformTrackGenreRelations", foreignKey: "platformGenreId" });
|
|
412
|
-
CanonAlbumTrackRelation.belongsTo(PlatformTrack, { as: "canonTrack", foreignKey: "canonTrackId" });
|
|
413
|
-
PlatformTrack.hasMany(CanonAlbumTrackRelation, { as: "canonAlbumTrackRelations", foreignKey: "canonTrackId" });
|
|
414
414
|
CanonToPlatformTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId" });
|
|
415
415
|
PlatformTrack.hasMany(CanonToPlatformTrackRelation, { as: "canonToPlatformTrackRelations", foreignKey: "platformTrackId" });
|
|
416
416
|
PlatformAlbumTrackRelation.belongsTo(PlatformTrack, { as: "platformTrack", foreignKey: "platformTrackId" });
|
|
@@ -427,8 +427,8 @@ function initModels(sequelize) {
|
|
|
427
427
|
PlatformUserAlbum.hasMany(PlatformUserAlbumTrack, { as: "platformUserAlbumTracks", foreignKey: "platformUserAlbumId" });
|
|
428
428
|
PlatformUserPlaylistTrack.belongsTo(PlatformUserPlaylist, { as: "platformUserPlaylist", foreignKey: "platformUserPlaylistId" });
|
|
429
429
|
PlatformUserPlaylist.hasMany(PlatformUserPlaylistTrack, { as: "platformUserPlaylistTracks", foreignKey: "platformUserPlaylistId" });
|
|
430
|
-
JukeboxQueueEntry.belongsTo(
|
|
431
|
-
|
|
430
|
+
JukeboxQueueEntry.belongsTo(PlaybackStatusType, { as: "playbackStatusType", foreignKey: "playbackStatusTypeId" });
|
|
431
|
+
PlaybackStatusType.hasMany(JukeboxQueueEntry, { as: "jukeboxQueueEntries", foreignKey: "playbackStatusTypeId" });
|
|
432
432
|
AppUser.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
|
433
433
|
State.hasMany(AppUser, { as: "appUsers", foreignKey: "stateId" });
|
|
434
434
|
PlatformUserPlaylist.belongsTo(State, { as: "state", foreignKey: "stateId" });
|
package/models/AppUser.ts
CHANGED
|
@@ -12,13 +12,13 @@ import type { State, StateId } from './State';
|
|
|
12
12
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
13
13
|
|
|
14
14
|
export interface AppUserAttributes {
|
|
15
|
-
id: string;
|
|
16
15
|
email: string;
|
|
17
16
|
firstName: string;
|
|
17
|
+
id: string;
|
|
18
18
|
createDate: Date;
|
|
19
19
|
updateDate: Date;
|
|
20
|
-
stateId: number;
|
|
21
20
|
syncContacts?: boolean;
|
|
21
|
+
stateId?: number;
|
|
22
22
|
lastName?: string;
|
|
23
23
|
autoApproveFollowers: boolean;
|
|
24
24
|
lastHarvested?: Date;
|
|
@@ -27,17 +27,17 @@ export interface AppUserAttributes {
|
|
|
27
27
|
|
|
28
28
|
export type AppUserPk = "id";
|
|
29
29
|
export type AppUserId = AppUser[AppUserPk];
|
|
30
|
-
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "
|
|
30
|
+
export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError";
|
|
31
31
|
export type AppUserCreationAttributes = Optional<AppUserAttributes, AppUserOptionalAttributes>;
|
|
32
32
|
|
|
33
33
|
export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes> implements AppUserAttributes {
|
|
34
|
-
id!: string;
|
|
35
34
|
email!: string;
|
|
36
35
|
firstName!: string;
|
|
36
|
+
id!: string;
|
|
37
37
|
createDate!: Date;
|
|
38
38
|
updateDate!: Date;
|
|
39
|
-
stateId!: number;
|
|
40
39
|
syncContacts?: boolean;
|
|
40
|
+
stateId?: number;
|
|
41
41
|
lastName?: string;
|
|
42
42
|
autoApproveFollowers!: boolean;
|
|
43
43
|
lastHarvested?: Date;
|
|
@@ -176,12 +176,6 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
176
176
|
|
|
177
177
|
static initModel(sequelize: Sequelize.Sequelize): typeof AppUser {
|
|
178
178
|
return AppUser.init({
|
|
179
|
-
id: {
|
|
180
|
-
type: DataTypes.UUID,
|
|
181
|
-
allowNull: false,
|
|
182
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
183
|
-
primaryKey: true
|
|
184
|
-
},
|
|
185
179
|
email: {
|
|
186
180
|
type: DataTypes.TEXT,
|
|
187
181
|
allowNull: false,
|
|
@@ -192,6 +186,12 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
192
186
|
allowNull: false,
|
|
193
187
|
field: 'first_name'
|
|
194
188
|
},
|
|
189
|
+
id: {
|
|
190
|
+
type: DataTypes.UUID,
|
|
191
|
+
allowNull: false,
|
|
192
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
193
|
+
primaryKey: true
|
|
194
|
+
},
|
|
195
195
|
createDate: {
|
|
196
196
|
type: DataTypes.DATE,
|
|
197
197
|
allowNull: false,
|
|
@@ -204,9 +204,15 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
204
204
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
205
205
|
field: 'update_date'
|
|
206
206
|
},
|
|
207
|
+
syncContacts: {
|
|
208
|
+
type: DataTypes.BOOLEAN,
|
|
209
|
+
allowNull: true,
|
|
210
|
+
defaultValue: false,
|
|
211
|
+
field: 'sync_contacts'
|
|
212
|
+
},
|
|
207
213
|
stateId: {
|
|
208
214
|
type: DataTypes.SMALLINT,
|
|
209
|
-
allowNull:
|
|
215
|
+
allowNull: true,
|
|
210
216
|
defaultValue: 0,
|
|
211
217
|
references: {
|
|
212
218
|
model: 'state',
|
|
@@ -214,12 +220,6 @@ export class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes>
|
|
|
214
220
|
},
|
|
215
221
|
field: 'state_id'
|
|
216
222
|
},
|
|
217
|
-
syncContacts: {
|
|
218
|
-
type: DataTypes.BOOLEAN,
|
|
219
|
-
allowNull: true,
|
|
220
|
-
defaultValue: false,
|
|
221
|
-
field: 'sync_contacts'
|
|
222
|
-
},
|
|
223
223
|
lastName: {
|
|
224
224
|
type: DataTypes.TEXT,
|
|
225
225
|
allowNull: true,
|