34 lines
924 B
JavaScript
34 lines
924 B
JavaScript
const { DataTypes } = require('sequelize');
|
|
const sequelize = require('../db/database');
|
|
|
|
const Season = sequelize.define("season",
|
|
{
|
|
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
|
|
|
tmdb_id: { type: DataTypes.STRING(30) },
|
|
imdb_id: { type: DataTypes.STRING(30) },
|
|
|
|
entry_id: {
|
|
type: DataTypes.INTEGER,
|
|
references: {
|
|
model: 'Entries',
|
|
key: 'id'
|
|
}
|
|
},
|
|
|
|
name: { type: DataTypes.STRING(500) },
|
|
overview: { type: DataTypes.STRING(3000) },
|
|
season_number: { type: DataTypes.INTEGER },
|
|
episode_count: { type: DataTypes.INTEGER },
|
|
air_date: { type: DataTypes.DATE },
|
|
|
|
user_rating: { type: DataTypes.FLOAT },
|
|
tmdb_rating: { type: DataTypes.FLOAT },
|
|
imdb_rating: { type: DataTypes.FLOAT },
|
|
|
|
poster_path: { type: DataTypes.STRING(200) },
|
|
banner_path: { type: DataTypes.STRING(200) },
|
|
}
|
|
);
|
|
|
|
module.exports = Season; |