Files
Showy/backend/models/Season.js
T
2024-04-01 07:30:42 +00:00

30 lines
783 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) },
entry_id: {
type: DataTypes.INTEGER,
references: {
model: 'Entries',
key: 'id'
}
},
name: { type: DataTypes.STRING(30) },
overview: { type: DataTypes.STRING(1000) },
season_number: { type: DataTypes.INTEGER },
air_date: { type: DataTypes.DATE },
user_rating: { type: DataTypes.FLOAT },
tmdb_rating: { type: DataTypes.FLOAT },
poster_path: { type: DataTypes.STRING(60) },
banner_path: { type: DataTypes.STRING(60) },
}
);
module.exports = Season;