Files
Showy/backend/models/Credit.js
T

25 lines
850 B
JavaScript

const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');
const Credit = sequelize.define("credits",
{
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
tmdb_credit_id: { type: DataTypes.STRING(100) },
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
profile_path: { type: DataTypes.STRING(200), field: 'profile_path' },
character: { type: DataTypes.STRING(100) },
order: { type: DataTypes.INTEGER },
cast_type: { type: DataTypes.ENUM('cast', 'crew'), field: 'cast_type', defaultValue: 'cast' },
department: { type: DataTypes.STRING(100) },
job: { type: DataTypes.STRING(100) },
entry_id: { type: DataTypes.INTEGER, field: 'entry_id' },
people_id: { type: DataTypes.INTEGER, field: 'people_id' },
}
);
module.exports = Credit;