Back: reworked the media/entry relation
This commit is contained in:
1 parent
d06a21097f
commit
b42e055691
5 files changed
+41
-30
No files matched your search
@@ -0,0 +1,22 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../db/database');
|
||||
|
||||
const Collection = sequelize.define("userCollection",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
tmdbId: { type: DataTypes.STRING(30), field: 'tmdb_id' },
|
||||
imdbId: { type: DataTypes.STRING(30), field: 'imdb_id' },
|
||||
tvdbId: { type: DataTypes.STRING(30), field: 'tvdb_id' },
|
||||
|
||||
name: { type: DataTypes.STRING(150) },
|
||||
description: { type: DataTypes.STRING(3000) },
|
||||
isUserCollection: { type: DataTypes.BOOLEAN, defaultValue: false, field: 'is_user_collection' },
|
||||
userRating: { type: DataTypes.FLOAT, field: 'user_rating' },
|
||||
|
||||
posterPath: { type: DataTypes.STRING(200), field: 'poster_path' },
|
||||
backdropPath: { type: DataTypes.STRING(200), field: 'backdrop_path' },
|
||||
isLocal: { type: DataTypes.BOOLEAN, defaultValue: false, field: 'is_local' }
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = Collection;
|
||||
Reference in new issue
Block a user