B: Added People and Credit Models for entry crew and cast
This commit is contained in:
1 parent
6bf27e5519
commit
ef9e1911f9
4 files changed
+70
-1
No files matched your search
@@ -0,0 +1,33 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
|
||||
const People = sequelize.define("peoples",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
tmdb_id: { type: DataTypes.STRING(100) },
|
||||
|
||||
name: { type: DataTypes.STRING(100) },
|
||||
birthday: { type: DataTypes.DATEONLY },
|
||||
deathday: { type: DataTypes.DATEONLY, allowNull: true },
|
||||
gender: { type: DataTypes.INTEGER },
|
||||
|
||||
biography: { type: DataTypes.TEXT },
|
||||
place_of_birth: { type: DataTypes.STRING(100), field: 'place_of_birth' },
|
||||
|
||||
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
popularity: { type: DataTypes.FLOAT },
|
||||
|
||||
known_for_department: { type: DataTypes.STRING(50), field: 'known_for_department' },
|
||||
homepage: { type: DataTypes.STRING(200), allowNull: true },
|
||||
|
||||
imdb_id: { type: DataTypes.STRING(20), field: 'imdb_id' },
|
||||
profile_path: { type: DataTypes.STRING(200), field: 'profile_path' },
|
||||
|
||||
last_fetch: { type: DataTypes.DATEONLY, field: 'last_fetch' },
|
||||
profile_update: { type: DataTypes.DATEONLY, field: 'profile_update' },
|
||||
fully_fetched: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = People;
|
||||
Reference in new issue
Block a user