@earbug/db-models 0.0.7 → 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 +5 -5
- package/dist/CanonAlbum.js +10 -10
- package/dist/CanonAlbumImageHarvested.d.ts +9 -9
- package/dist/CanonAlbumImageHarvested.js +24 -32
- package/dist/CanonArtist.d.ts +3 -3
- 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 +5 -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/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 -5
- 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 -3
- 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 +2 -2
- 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 +15 -15
- package/models/CanonAlbumImageHarvested.ts +33 -41
- package/models/CanonArtist.ts +9 -9
- 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 +16 -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/NewsSite.ts +9 -9
- package/models/Platform.ts +9 -9
- package/models/PlatformAlbum.ts +15 -15
- package/models/PlatformArtist.ts +15 -15
- package/models/PlatformGenre.ts +8 -8
- package/models/PlatformTrack.ts +9 -9
- 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 +2 -2
- package/package.json +1 -1
package/models/Platform.ts
CHANGED
|
@@ -11,10 +11,10 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
|
|
|
11
11
|
import type { UnmatchedArtist, UnmatchedArtistId } from './UnmatchedArtist';
|
|
12
12
|
|
|
13
13
|
export interface PlatformAttributes {
|
|
14
|
-
id: number;
|
|
15
14
|
name: string;
|
|
16
15
|
createDate: Date;
|
|
17
16
|
updateDate: Date;
|
|
17
|
+
id: number;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type PlatformPk = "id";
|
|
@@ -23,10 +23,10 @@ export type PlatformOptionalAttributes = "createDate" | "updateDate";
|
|
|
23
23
|
export type PlatformCreationAttributes = Optional<PlatformAttributes, PlatformOptionalAttributes>;
|
|
24
24
|
|
|
25
25
|
export class Platform extends Model<PlatformAttributes, PlatformCreationAttributes> implements PlatformAttributes {
|
|
26
|
-
id!: number;
|
|
27
26
|
name!: string;
|
|
28
27
|
createDate!: Date;
|
|
29
28
|
updateDate!: Date;
|
|
29
|
+
id!: number;
|
|
30
30
|
|
|
31
31
|
// Platform hasMany AppUserPlatformRelation via platformId
|
|
32
32
|
appUserPlatformRelations!: AppUserPlatformRelation[];
|
|
@@ -139,13 +139,6 @@ export class Platform extends Model<PlatformAttributes, PlatformCreationAttribut
|
|
|
139
139
|
|
|
140
140
|
static initModel(sequelize: Sequelize.Sequelize): typeof Platform {
|
|
141
141
|
return Platform.init({
|
|
142
|
-
id: {
|
|
143
|
-
autoIncrement: true,
|
|
144
|
-
autoIncrementIdentity: true,
|
|
145
|
-
type: DataTypes.SMALLINT,
|
|
146
|
-
allowNull: false,
|
|
147
|
-
primaryKey: true
|
|
148
|
-
},
|
|
149
142
|
name: {
|
|
150
143
|
type: DataTypes.TEXT,
|
|
151
144
|
allowNull: false,
|
|
@@ -162,6 +155,13 @@ export class Platform extends Model<PlatformAttributes, PlatformCreationAttribut
|
|
|
162
155
|
allowNull: false,
|
|
163
156
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
164
157
|
field: 'update_date'
|
|
158
|
+
},
|
|
159
|
+
id: {
|
|
160
|
+
autoIncrement: true,
|
|
161
|
+
autoIncrementIdentity: true,
|
|
162
|
+
type: DataTypes.SMALLINT,
|
|
163
|
+
allowNull: false,
|
|
164
|
+
primaryKey: true
|
|
165
165
|
}
|
|
166
166
|
}, {
|
|
167
167
|
sequelize,
|
package/models/PlatformAlbum.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum
|
|
|
19
19
|
import type { UnmatchedAlbum, UnmatchedAlbumId } from './UnmatchedAlbum';
|
|
20
20
|
|
|
21
21
|
export interface PlatformAlbumAttributes {
|
|
22
|
-
id: string;
|
|
23
22
|
platformId: number;
|
|
24
23
|
externalAlbumId: string;
|
|
25
24
|
name: string;
|
|
@@ -28,20 +27,20 @@ export interface PlatformAlbumAttributes {
|
|
|
28
27
|
releaseDate?: string;
|
|
29
28
|
popularity?: number;
|
|
30
29
|
recordLabel?: string;
|
|
30
|
+
images?: object;
|
|
31
|
+
id: string;
|
|
31
32
|
createDate: Date;
|
|
32
33
|
updateDate: Date;
|
|
33
|
-
images?: object;
|
|
34
34
|
lastHarvestDate?: Date;
|
|
35
35
|
lastHarvestLog?: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export type PlatformAlbumPk = "id";
|
|
39
39
|
export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
|
|
40
|
-
export type PlatformAlbumOptionalAttributes = "
|
|
40
|
+
export type PlatformAlbumOptionalAttributes = "albumType" | "releaseDate" | "popularity" | "recordLabel" | "images" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
|
|
41
41
|
export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
|
|
42
42
|
|
|
43
43
|
export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
|
|
44
|
-
id!: string;
|
|
45
44
|
platformId!: number;
|
|
46
45
|
externalAlbumId!: string;
|
|
47
46
|
name!: string;
|
|
@@ -50,9 +49,10 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
50
49
|
releaseDate?: string;
|
|
51
50
|
popularity?: number;
|
|
52
51
|
recordLabel?: string;
|
|
52
|
+
images?: object;
|
|
53
|
+
id!: string;
|
|
53
54
|
createDate!: Date;
|
|
54
55
|
updateDate!: Date;
|
|
55
|
-
images?: object;
|
|
56
56
|
lastHarvestDate?: Date;
|
|
57
57
|
lastHarvestLog?: string;
|
|
58
58
|
|
|
@@ -256,12 +256,6 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
256
256
|
|
|
257
257
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformAlbum {
|
|
258
258
|
return PlatformAlbum.init({
|
|
259
|
-
id: {
|
|
260
|
-
type: DataTypes.UUID,
|
|
261
|
-
allowNull: false,
|
|
262
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
263
|
-
primaryKey: true
|
|
264
|
-
},
|
|
265
259
|
platformId: {
|
|
266
260
|
type: DataTypes.SMALLINT,
|
|
267
261
|
allowNull: false,
|
|
@@ -306,6 +300,16 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
306
300
|
allowNull: true,
|
|
307
301
|
field: 'record_label'
|
|
308
302
|
},
|
|
303
|
+
images: {
|
|
304
|
+
type: DataTypes.JSONB,
|
|
305
|
+
allowNull: true
|
|
306
|
+
},
|
|
307
|
+
id: {
|
|
308
|
+
type: DataTypes.UUID,
|
|
309
|
+
allowNull: false,
|
|
310
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
311
|
+
primaryKey: true
|
|
312
|
+
},
|
|
309
313
|
createDate: {
|
|
310
314
|
type: DataTypes.DATE,
|
|
311
315
|
allowNull: false,
|
|
@@ -318,10 +322,6 @@ export class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumC
|
|
|
318
322
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
319
323
|
field: 'update_date'
|
|
320
324
|
},
|
|
321
|
-
images: {
|
|
322
|
-
type: DataTypes.JSONB,
|
|
323
|
-
allowNull: true
|
|
324
|
-
},
|
|
325
325
|
lastHarvestDate: {
|
|
326
326
|
type: DataTypes.DATE,
|
|
327
327
|
allowNull: true,
|
package/models/PlatformArtist.ts
CHANGED
|
@@ -17,15 +17,15 @@ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
|
|
|
17
17
|
import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
18
18
|
|
|
19
19
|
export interface PlatformArtistAttributes {
|
|
20
|
-
id: string;
|
|
21
20
|
externalArtistId: string;
|
|
22
21
|
platformId: number;
|
|
23
22
|
name: string;
|
|
24
23
|
asciiName: string;
|
|
25
24
|
externalUri?: string;
|
|
25
|
+
genres?: string[];
|
|
26
|
+
id: string;
|
|
26
27
|
createDate: Date;
|
|
27
28
|
updateDate: Date;
|
|
28
|
-
genres?: string[];
|
|
29
29
|
lastHarvestDate?: Date;
|
|
30
30
|
lastHarvestLog?: string;
|
|
31
31
|
images?: object;
|
|
@@ -33,19 +33,19 @@ export interface PlatformArtistAttributes {
|
|
|
33
33
|
|
|
34
34
|
export type PlatformArtistPk = "id";
|
|
35
35
|
export type PlatformArtistId = PlatformArtist[PlatformArtistPk];
|
|
36
|
-
export type PlatformArtistOptionalAttributes = "
|
|
36
|
+
export type PlatformArtistOptionalAttributes = "externalUri" | "genres" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog" | "images";
|
|
37
37
|
export type PlatformArtistCreationAttributes = Optional<PlatformArtistAttributes, PlatformArtistOptionalAttributes>;
|
|
38
38
|
|
|
39
39
|
export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArtistCreationAttributes> implements PlatformArtistAttributes {
|
|
40
|
-
id!: string;
|
|
41
40
|
externalArtistId!: string;
|
|
42
41
|
platformId!: number;
|
|
43
42
|
name!: string;
|
|
44
43
|
asciiName!: string;
|
|
45
44
|
externalUri?: string;
|
|
45
|
+
genres?: string[];
|
|
46
|
+
id!: string;
|
|
46
47
|
createDate!: Date;
|
|
47
48
|
updateDate!: Date;
|
|
48
|
-
genres?: string[];
|
|
49
49
|
lastHarvestDate?: Date;
|
|
50
50
|
lastHarvestLog?: string;
|
|
51
51
|
images?: object;
|
|
@@ -226,12 +226,6 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
|
|
|
226
226
|
|
|
227
227
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformArtist {
|
|
228
228
|
return PlatformArtist.init({
|
|
229
|
-
id: {
|
|
230
|
-
type: DataTypes.UUID,
|
|
231
|
-
allowNull: false,
|
|
232
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
233
|
-
primaryKey: true
|
|
234
|
-
},
|
|
235
229
|
externalArtistId: {
|
|
236
230
|
type: DataTypes.TEXT,
|
|
237
231
|
allowNull: false,
|
|
@@ -262,6 +256,16 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
|
|
|
262
256
|
allowNull: true,
|
|
263
257
|
field: 'external_uri'
|
|
264
258
|
},
|
|
259
|
+
genres: {
|
|
260
|
+
type: DataTypes.ARRAY(DataTypes.TEXT),
|
|
261
|
+
allowNull: true
|
|
262
|
+
},
|
|
263
|
+
id: {
|
|
264
|
+
type: DataTypes.UUID,
|
|
265
|
+
allowNull: false,
|
|
266
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
267
|
+
primaryKey: true
|
|
268
|
+
},
|
|
265
269
|
createDate: {
|
|
266
270
|
type: DataTypes.DATE,
|
|
267
271
|
allowNull: false,
|
|
@@ -274,10 +278,6 @@ export class PlatformArtist extends Model<PlatformArtistAttributes, PlatformArti
|
|
|
274
278
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
275
279
|
field: 'update_date'
|
|
276
280
|
},
|
|
277
|
-
genres: {
|
|
278
|
-
type: DataTypes.ARRAY(DataTypes.TEXT),
|
|
279
|
-
allowNull: true
|
|
280
|
-
},
|
|
281
281
|
lastHarvestDate: {
|
|
282
282
|
type: DataTypes.DATE,
|
|
283
283
|
allowNull: true,
|
package/models/PlatformGenre.ts
CHANGED
|
@@ -11,9 +11,9 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
|
11
11
|
import type { PlatformTrackGenreRelation, PlatformTrackGenreRelationId } from './PlatformTrackGenreRelation';
|
|
12
12
|
|
|
13
13
|
export interface PlatformGenreAttributes {
|
|
14
|
-
id: string;
|
|
15
14
|
platformId: number;
|
|
16
15
|
name: string;
|
|
16
|
+
id: string;
|
|
17
17
|
createDate: Date;
|
|
18
18
|
updateDate: Date;
|
|
19
19
|
}
|
|
@@ -24,9 +24,9 @@ export type PlatformGenreOptionalAttributes = "id" | "createDate" | "updateDate"
|
|
|
24
24
|
export type PlatformGenreCreationAttributes = Optional<PlatformGenreAttributes, PlatformGenreOptionalAttributes>;
|
|
25
25
|
|
|
26
26
|
export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreCreationAttributes> implements PlatformGenreAttributes {
|
|
27
|
-
id!: string;
|
|
28
27
|
platformId!: number;
|
|
29
28
|
name!: string;
|
|
29
|
+
id!: string;
|
|
30
30
|
createDate!: Date;
|
|
31
31
|
updateDate!: Date;
|
|
32
32
|
|
|
@@ -134,12 +134,6 @@ export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreC
|
|
|
134
134
|
|
|
135
135
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformGenre {
|
|
136
136
|
return PlatformGenre.init({
|
|
137
|
-
id: {
|
|
138
|
-
type: DataTypes.UUID,
|
|
139
|
-
allowNull: false,
|
|
140
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
141
|
-
primaryKey: true
|
|
142
|
-
},
|
|
143
137
|
platformId: {
|
|
144
138
|
type: DataTypes.SMALLINT,
|
|
145
139
|
allowNull: false,
|
|
@@ -155,6 +149,12 @@ export class PlatformGenre extends Model<PlatformGenreAttributes, PlatformGenreC
|
|
|
155
149
|
allowNull: false,
|
|
156
150
|
unique: "platform_genre_name_pkey"
|
|
157
151
|
},
|
|
152
|
+
id: {
|
|
153
|
+
type: DataTypes.UUID,
|
|
154
|
+
allowNull: false,
|
|
155
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
156
|
+
primaryKey: true
|
|
157
|
+
},
|
|
158
158
|
createDate: {
|
|
159
159
|
type: DataTypes.DATE,
|
|
160
160
|
allowNull: false,
|
package/models/PlatformTrack.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './Platfor
|
|
|
13
13
|
import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
|
|
14
14
|
|
|
15
15
|
export interface PlatformTrackAttributes {
|
|
16
|
-
id: string;
|
|
17
16
|
platformId: number;
|
|
18
17
|
externalTrackId: string;
|
|
19
18
|
name: string;
|
|
@@ -23,6 +22,7 @@ export interface PlatformTrackAttributes {
|
|
|
23
22
|
popularity?: number;
|
|
24
23
|
discNumber?: number;
|
|
25
24
|
discTrackNumber?: number;
|
|
25
|
+
id: string;
|
|
26
26
|
createDate: Date;
|
|
27
27
|
updateDate: Date;
|
|
28
28
|
lastHarvestDate?: Date;
|
|
@@ -31,11 +31,10 @@ export interface PlatformTrackAttributes {
|
|
|
31
31
|
|
|
32
32
|
export type PlatformTrackPk = "id";
|
|
33
33
|
export type PlatformTrackId = PlatformTrack[PlatformTrackPk];
|
|
34
|
-
export type PlatformTrackOptionalAttributes = "
|
|
34
|
+
export type PlatformTrackOptionalAttributes = "explicit" | "popularity" | "discNumber" | "discTrackNumber" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
|
|
35
35
|
export type PlatformTrackCreationAttributes = Optional<PlatformTrackAttributes, PlatformTrackOptionalAttributes>;
|
|
36
36
|
|
|
37
37
|
export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackCreationAttributes> implements PlatformTrackAttributes {
|
|
38
|
-
id!: string;
|
|
39
38
|
platformId!: number;
|
|
40
39
|
externalTrackId!: string;
|
|
41
40
|
name!: string;
|
|
@@ -45,6 +44,7 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
45
44
|
popularity?: number;
|
|
46
45
|
discNumber?: number;
|
|
47
46
|
discTrackNumber?: number;
|
|
47
|
+
id!: string;
|
|
48
48
|
createDate!: Date;
|
|
49
49
|
updateDate!: Date;
|
|
50
50
|
lastHarvestDate?: Date;
|
|
@@ -178,12 +178,6 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
178
178
|
|
|
179
179
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformTrack {
|
|
180
180
|
return PlatformTrack.init({
|
|
181
|
-
id: {
|
|
182
|
-
type: DataTypes.UUID,
|
|
183
|
-
allowNull: false,
|
|
184
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
185
|
-
primaryKey: true
|
|
186
|
-
},
|
|
187
181
|
platformId: {
|
|
188
182
|
type: DataTypes.SMALLINT,
|
|
189
183
|
allowNull: false,
|
|
@@ -232,6 +226,12 @@ export class PlatformTrack extends Model<PlatformTrackAttributes, PlatformTrackC
|
|
|
232
226
|
allowNull: true,
|
|
233
227
|
field: 'disc_track_number'
|
|
234
228
|
},
|
|
229
|
+
id: {
|
|
230
|
+
type: DataTypes.UUID,
|
|
231
|
+
allowNull: false,
|
|
232
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
233
|
+
primaryKey: true
|
|
234
|
+
},
|
|
235
235
|
createDate: {
|
|
236
236
|
type: DataTypes.DATE,
|
|
237
237
|
allowNull: false,
|
|
@@ -6,11 +6,11 @@ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
|
|
|
6
6
|
import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
|
|
7
7
|
|
|
8
8
|
export interface PlatformUserAlbumAttributes {
|
|
9
|
-
id: string;
|
|
10
9
|
appUserId: string;
|
|
11
10
|
platformId: number;
|
|
12
11
|
externalUserAlbumId: string;
|
|
13
12
|
platformAlbumId: string;
|
|
13
|
+
id: string;
|
|
14
14
|
createdAt: Date;
|
|
15
15
|
updatedAt: Date;
|
|
16
16
|
stateId: number;
|
|
@@ -22,11 +22,11 @@ export type PlatformUserAlbumOptionalAttributes = "id" | "createdAt" | "updatedA
|
|
|
22
22
|
export type PlatformUserAlbumCreationAttributes = Optional<PlatformUserAlbumAttributes, PlatformUserAlbumOptionalAttributes>;
|
|
23
23
|
|
|
24
24
|
export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes> implements PlatformUserAlbumAttributes {
|
|
25
|
-
id!: string;
|
|
26
25
|
appUserId!: string;
|
|
27
26
|
platformId!: number;
|
|
28
27
|
externalUserAlbumId!: string;
|
|
29
28
|
platformAlbumId!: string;
|
|
29
|
+
id!: string;
|
|
30
30
|
createdAt!: Date;
|
|
31
31
|
updatedAt!: Date;
|
|
32
32
|
stateId!: number;
|
|
@@ -61,12 +61,6 @@ export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, Platfo
|
|
|
61
61
|
|
|
62
62
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbum {
|
|
63
63
|
return PlatformUserAlbum.init({
|
|
64
|
-
id: {
|
|
65
|
-
type: DataTypes.UUID,
|
|
66
|
-
allowNull: false,
|
|
67
|
-
defaultValue: DataTypes.UUIDV4,
|
|
68
|
-
primaryKey: true
|
|
69
|
-
},
|
|
70
64
|
appUserId: {
|
|
71
65
|
type: DataTypes.UUID,
|
|
72
66
|
allowNull: false,
|
|
@@ -101,6 +95,12 @@ export class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, Platfo
|
|
|
101
95
|
unique: "platform_user_album_app_user_id_platform_album_id_unique",
|
|
102
96
|
field: 'platform_album_id'
|
|
103
97
|
},
|
|
98
|
+
id: {
|
|
99
|
+
type: DataTypes.UUID,
|
|
100
|
+
allowNull: false,
|
|
101
|
+
defaultValue: DataTypes.UUIDV4,
|
|
102
|
+
primaryKey: true
|
|
103
|
+
},
|
|
104
104
|
createdAt: {
|
|
105
105
|
type: DataTypes.DATE,
|
|
106
106
|
allowNull: false,
|
|
@@ -5,14 +5,14 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
|
|
|
5
5
|
import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
|
|
6
6
|
|
|
7
7
|
export interface PlatformUserAlbumTrackAttributes {
|
|
8
|
-
id: string;
|
|
9
8
|
platformUserAlbumId: string;
|
|
10
9
|
platformId: number;
|
|
11
10
|
externalUserAlbumTrackId: string;
|
|
12
11
|
platformTrackId: string;
|
|
12
|
+
stateId: number;
|
|
13
|
+
id: string;
|
|
13
14
|
createdAt: Date;
|
|
14
15
|
updatedAt: Date;
|
|
15
|
-
stateId: number;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export type PlatformUserAlbumTrackPk = "id";
|
|
@@ -21,14 +21,14 @@ export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "upd
|
|
|
21
21
|
export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
|
|
22
22
|
|
|
23
23
|
export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
|
|
24
|
-
id!: string;
|
|
25
24
|
platformUserAlbumId!: string;
|
|
26
25
|
platformId!: number;
|
|
27
26
|
externalUserAlbumTrackId!: string;
|
|
28
27
|
platformTrackId!: string;
|
|
28
|
+
stateId!: number;
|
|
29
|
+
id!: string;
|
|
29
30
|
createdAt!: Date;
|
|
30
31
|
updatedAt!: Date;
|
|
31
|
-
stateId!: number;
|
|
32
32
|
|
|
33
33
|
// PlatformUserAlbumTrack belongsTo Platform via platformId
|
|
34
34
|
platform!: Platform;
|
|
@@ -48,12 +48,6 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
|
|
|
48
48
|
|
|
49
49
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbumTrack {
|
|
50
50
|
return PlatformUserAlbumTrack.init({
|
|
51
|
-
id: {
|
|
52
|
-
type: DataTypes.UUID,
|
|
53
|
-
allowNull: false,
|
|
54
|
-
defaultValue: DataTypes.UUIDV4,
|
|
55
|
-
primaryKey: true
|
|
56
|
-
},
|
|
57
51
|
platformUserAlbumId: {
|
|
58
52
|
type: DataTypes.UUID,
|
|
59
53
|
allowNull: false,
|
|
@@ -88,6 +82,17 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
|
|
|
88
82
|
unique: "platform_user_album_track_platform_user_album_id_platform_track",
|
|
89
83
|
field: 'platform_track_id'
|
|
90
84
|
},
|
|
85
|
+
stateId: {
|
|
86
|
+
type: DataTypes.SMALLINT,
|
|
87
|
+
allowNull: false,
|
|
88
|
+
field: 'state_id'
|
|
89
|
+
},
|
|
90
|
+
id: {
|
|
91
|
+
type: DataTypes.UUID,
|
|
92
|
+
allowNull: false,
|
|
93
|
+
defaultValue: DataTypes.UUIDV4,
|
|
94
|
+
primaryKey: true
|
|
95
|
+
},
|
|
91
96
|
createdAt: {
|
|
92
97
|
type: DataTypes.DATE,
|
|
93
98
|
allowNull: false,
|
|
@@ -99,11 +104,6 @@ export class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttribut
|
|
|
99
104
|
allowNull: false,
|
|
100
105
|
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
101
106
|
field: 'updated_at'
|
|
102
|
-
},
|
|
103
|
-
stateId: {
|
|
104
|
-
type: DataTypes.SMALLINT,
|
|
105
|
-
allowNull: false,
|
|
106
|
-
field: 'state_id'
|
|
107
107
|
}
|
|
108
108
|
}, {
|
|
109
109
|
sequelize,
|
|
@@ -6,14 +6,14 @@ import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './P
|
|
|
6
6
|
import type { State, StateId } from './State';
|
|
7
7
|
|
|
8
8
|
export interface PlatformUserPlaylistAttributes {
|
|
9
|
-
id: string;
|
|
10
9
|
appUserId: string;
|
|
11
10
|
platformId: number;
|
|
12
11
|
externalPlaylistId: string;
|
|
13
12
|
name: string;
|
|
14
13
|
description?: string;
|
|
15
|
-
public?: boolean;
|
|
16
14
|
snapshotId: string;
|
|
15
|
+
id: string;
|
|
16
|
+
public?: boolean;
|
|
17
17
|
collaborative: boolean;
|
|
18
18
|
createDate: Date;
|
|
19
19
|
updateDate: Date;
|
|
@@ -22,18 +22,18 @@ export interface PlatformUserPlaylistAttributes {
|
|
|
22
22
|
|
|
23
23
|
export type PlatformUserPlaylistPk = "id";
|
|
24
24
|
export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
|
|
25
|
-
export type PlatformUserPlaylistOptionalAttributes = "
|
|
25
|
+
export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId";
|
|
26
26
|
export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
|
|
27
27
|
|
|
28
28
|
export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
|
|
29
|
-
id!: string;
|
|
30
29
|
appUserId!: string;
|
|
31
30
|
platformId!: number;
|
|
32
31
|
externalPlaylistId!: string;
|
|
33
32
|
name!: string;
|
|
34
33
|
description?: string;
|
|
35
|
-
public?: boolean;
|
|
36
34
|
snapshotId!: string;
|
|
35
|
+
id!: string;
|
|
36
|
+
public?: boolean;
|
|
37
37
|
collaborative!: boolean;
|
|
38
38
|
createDate!: Date;
|
|
39
39
|
updateDate!: Date;
|
|
@@ -69,12 +69,6 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
69
69
|
|
|
70
70
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylist {
|
|
71
71
|
return PlatformUserPlaylist.init({
|
|
72
|
-
id: {
|
|
73
|
-
type: DataTypes.UUID,
|
|
74
|
-
allowNull: false,
|
|
75
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
76
|
-
primaryKey: true
|
|
77
|
-
},
|
|
78
72
|
appUserId: {
|
|
79
73
|
type: DataTypes.UUID,
|
|
80
74
|
allowNull: false,
|
|
@@ -109,16 +103,22 @@ export class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes,
|
|
|
109
103
|
type: DataTypes.TEXT,
|
|
110
104
|
allowNull: true
|
|
111
105
|
},
|
|
112
|
-
public: {
|
|
113
|
-
type: DataTypes.BOOLEAN,
|
|
114
|
-
allowNull: true,
|
|
115
|
-
defaultValue: false
|
|
116
|
-
},
|
|
117
106
|
snapshotId: {
|
|
118
107
|
type: DataTypes.TEXT,
|
|
119
108
|
allowNull: false,
|
|
120
109
|
field: 'snapshot_id'
|
|
121
110
|
},
|
|
111
|
+
id: {
|
|
112
|
+
type: DataTypes.UUID,
|
|
113
|
+
allowNull: false,
|
|
114
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
115
|
+
primaryKey: true
|
|
116
|
+
},
|
|
117
|
+
public: {
|
|
118
|
+
type: DataTypes.BOOLEAN,
|
|
119
|
+
allowNull: true,
|
|
120
|
+
defaultValue: false
|
|
121
|
+
},
|
|
122
122
|
collaborative: {
|
|
123
123
|
type: DataTypes.BOOLEAN,
|
|
124
124
|
allowNull: false,
|
|
@@ -5,36 +5,36 @@ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUse
|
|
|
5
5
|
import type { State, StateId } from './State';
|
|
6
6
|
|
|
7
7
|
export interface PlatformUserPlaylistTrackAttributes {
|
|
8
|
-
id: string;
|
|
9
8
|
platformTrackId: string;
|
|
10
9
|
platformUserPlaylistId: string;
|
|
11
|
-
trackPosition: number;
|
|
12
10
|
addedDate?: Date;
|
|
13
11
|
addedByPlatformUserId?: string;
|
|
12
|
+
externalPlaylistTrackId: string;
|
|
13
|
+
id: string;
|
|
14
|
+
trackPosition: number;
|
|
14
15
|
isLocal: boolean;
|
|
15
16
|
createDate: Date;
|
|
16
17
|
updateDate: Date;
|
|
17
18
|
stateId: number;
|
|
18
|
-
externalPlaylistTrackId: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export type PlatformUserPlaylistTrackPk = "id";
|
|
22
22
|
export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
|
|
23
|
-
export type PlatformUserPlaylistTrackOptionalAttributes = "
|
|
23
|
+
export type PlatformUserPlaylistTrackOptionalAttributes = "addedDate" | "addedByPlatformUserId" | "id" | "trackPosition" | "createDate" | "updateDate" | "stateId";
|
|
24
24
|
export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
|
|
25
25
|
|
|
26
26
|
export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
|
|
27
|
-
id!: string;
|
|
28
27
|
platformTrackId!: string;
|
|
29
28
|
platformUserPlaylistId!: string;
|
|
30
|
-
trackPosition!: number;
|
|
31
29
|
addedDate?: Date;
|
|
32
30
|
addedByPlatformUserId?: string;
|
|
31
|
+
externalPlaylistTrackId!: string;
|
|
32
|
+
id!: string;
|
|
33
|
+
trackPosition!: number;
|
|
33
34
|
isLocal!: boolean;
|
|
34
35
|
createDate!: Date;
|
|
35
36
|
updateDate!: Date;
|
|
36
37
|
stateId!: number;
|
|
37
|
-
externalPlaylistTrackId!: string;
|
|
38
38
|
|
|
39
39
|
// PlatformUserPlaylistTrack belongsTo PlatformTrack via platformTrackId
|
|
40
40
|
platformTrack!: PlatformTrack;
|
|
@@ -54,12 +54,6 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
|
|
|
54
54
|
|
|
55
55
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistTrack {
|
|
56
56
|
return PlatformUserPlaylistTrack.init({
|
|
57
|
-
id: {
|
|
58
|
-
type: DataTypes.UUID,
|
|
59
|
-
allowNull: false,
|
|
60
|
-
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
61
|
-
primaryKey: true
|
|
62
|
-
},
|
|
63
57
|
platformTrackId: {
|
|
64
58
|
type: DataTypes.UUID,
|
|
65
59
|
allowNull: false,
|
|
@@ -80,12 +74,6 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
|
|
|
80
74
|
unique: "uk_playlist_id_track_id",
|
|
81
75
|
field: 'platform_user_playlist_id'
|
|
82
76
|
},
|
|
83
|
-
trackPosition: {
|
|
84
|
-
type: DataTypes.INTEGER,
|
|
85
|
-
allowNull: false,
|
|
86
|
-
defaultValue: 0,
|
|
87
|
-
field: 'track_position'
|
|
88
|
-
},
|
|
89
77
|
addedDate: {
|
|
90
78
|
type: DataTypes.DATE,
|
|
91
79
|
allowNull: true,
|
|
@@ -96,6 +84,23 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
|
|
|
96
84
|
allowNull: true,
|
|
97
85
|
field: 'added_by_platform_user_id'
|
|
98
86
|
},
|
|
87
|
+
externalPlaylistTrackId: {
|
|
88
|
+
type: DataTypes.STRING(255),
|
|
89
|
+
allowNull: false,
|
|
90
|
+
field: 'external_playlist_track_id'
|
|
91
|
+
},
|
|
92
|
+
id: {
|
|
93
|
+
type: DataTypes.UUID,
|
|
94
|
+
allowNull: false,
|
|
95
|
+
defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
|
|
96
|
+
primaryKey: true
|
|
97
|
+
},
|
|
98
|
+
trackPosition: {
|
|
99
|
+
type: DataTypes.INTEGER,
|
|
100
|
+
allowNull: false,
|
|
101
|
+
defaultValue: 0,
|
|
102
|
+
field: 'track_position'
|
|
103
|
+
},
|
|
99
104
|
isLocal: {
|
|
100
105
|
type: DataTypes.BOOLEAN,
|
|
101
106
|
allowNull: false,
|
|
@@ -123,11 +128,6 @@ export class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAt
|
|
|
123
128
|
key: 'id'
|
|
124
129
|
},
|
|
125
130
|
field: 'state_id'
|
|
126
|
-
},
|
|
127
|
-
externalPlaylistTrackId: {
|
|
128
|
-
type: DataTypes.STRING(255),
|
|
129
|
-
allowNull: false,
|
|
130
|
-
field: 'external_playlist_track_id'
|
|
131
131
|
}
|
|
132
132
|
}, {
|
|
133
133
|
sequelize,
|
package/models/PlaybackStatus.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { DataTypes, Model, Optional } from 'sequelize';
|
|
3
|
-
import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
|
|
4
3
|
|
|
5
4
|
export interface PlaybackStatusAttributes {
|
|
6
|
-
id: number;
|
|
7
5
|
description: string;
|
|
6
|
+
id: number;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
export type PlaybackStatusPk = "id";
|
|
@@ -12,34 +11,22 @@ export type PlaybackStatusId = PlaybackStatus[PlaybackStatusPk];
|
|
|
12
11
|
export type PlaybackStatusCreationAttributes = PlaybackStatusAttributes;
|
|
13
12
|
|
|
14
13
|
export class PlaybackStatus extends Model<PlaybackStatusAttributes, PlaybackStatusCreationAttributes> implements PlaybackStatusAttributes {
|
|
15
|
-
id!: number;
|
|
16
14
|
description!: string;
|
|
15
|
+
id!: number;
|
|
17
16
|
|
|
18
|
-
// PlaybackStatus hasMany JukeboxQueueEntry via playbackStatusTypeId
|
|
19
|
-
jukeboxQueueEntries!: JukeboxQueueEntry[];
|
|
20
|
-
getJukeboxQueueEntries!: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
|
|
21
|
-
setJukeboxQueueEntries!: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
22
|
-
addJukeboxQueueEntry!: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
23
|
-
addJukeboxQueueEntries!: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
24
|
-
createJukeboxQueueEntry!: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
|
|
25
|
-
removeJukeboxQueueEntry!: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
26
|
-
removeJukeboxQueueEntries!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
27
|
-
hasJukeboxQueueEntry!: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
28
|
-
hasJukeboxQueueEntries!: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
|
|
29
|
-
countJukeboxQueueEntries!: Sequelize.HasManyCountAssociationsMixin;
|
|
30
17
|
|
|
31
18
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlaybackStatus {
|
|
32
19
|
return PlaybackStatus.init({
|
|
20
|
+
description: {
|
|
21
|
+
type: DataTypes.TEXT,
|
|
22
|
+
allowNull: false
|
|
23
|
+
},
|
|
33
24
|
id: {
|
|
34
25
|
autoIncrement: true,
|
|
35
26
|
autoIncrementIdentity: true,
|
|
36
27
|
type: DataTypes.SMALLINT,
|
|
37
28
|
allowNull: false,
|
|
38
29
|
primaryKey: true
|
|
39
|
-
},
|
|
40
|
-
description: {
|
|
41
|
-
type: DataTypes.TEXT,
|
|
42
|
-
allowNull: false
|
|
43
30
|
}
|
|
44
31
|
}, {
|
|
45
32
|
sequelize,
|