created entry, entryid, entryRating, collection models
This commit is contained in:
1 parent
0670b4b65d
commit
772db77e98
4 files changed
+89
No files matched your search
@@ -0,0 +1,22 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../db/database');
|
||||
|
||||
|
||||
const EntryRating = sequelize.define("entryRating",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
},
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
imdb_rating: { type: DataTypes.FLOAT },
|
||||
rotten_tomatoes_rating: { type: DataTypes.FLOAT },
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = EntryRating;
|
||||
Reference in new issue
Block a user