36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
const { DataTypes } = require('sequelize');
|
|
const sequelize = require('../db/database');
|
|
|
|
const Entry = sequelize.define("entry",
|
|
{
|
|
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
|
|
|
title: { type: DataTypes.STRING(100) },
|
|
original_title: { type: DataTypes.STRING(50) },
|
|
release_date: { type: DataTypes.DATE },
|
|
runtime: { type: DataTypes.INTEGER },
|
|
|
|
tagline: { type: DataTypes.STRING(100) },
|
|
storyline: { type: DataTypes.STRING(1000) },
|
|
country: { type: DataTypes.STRING(30) },
|
|
|
|
certification: { type: DataTypes.INTEGER },
|
|
network_studio: { type: DataTypes.STRING(40) },
|
|
collection_id: { type: DataTypes.INTEGER },
|
|
|
|
watchlist: { type: DataTypes.BOOLEAN, defaultValue: false },
|
|
favorit: { type: DataTypes.BOOLEAN, defaultValue: false },
|
|
hidden: { type: DataTypes.BOOLEAN, defaultValue: false },
|
|
|
|
is_tvseries: { type: DataTypes.BOOLEAN },
|
|
status: { type: DataTypes.STRING(20) },
|
|
|
|
poster_path: { type: DataTypes.STRING(60) },
|
|
banner_path: { type: DataTypes.STRING(60) },
|
|
|
|
date_first_seen: { type: DataTypes.DATEONLY },
|
|
date_last_seen: { type: DataTypes.DATEONLY }
|
|
}
|
|
);
|
|
|
|
module.exports = Entry; |