import { Sequelize, Model } from 'sequelize'
import sequelize from '..lib/db'
import {config} from 'lin-mizar';
class Movie extends Model {
}
Movie.init(
attributes: {
id:{
type:Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
}, image:{
type:Sequelize.STRING(64),
},
content: {
type:Sequelize.STRING(300),
allowNull: true,
},
fav_nums:{
type:Sequelize.INTEGER,
defaultValue: 0,
},
titile:{
type:Sequelize.STRING(50),
},
type: {
type:Sequelize.INTEGER,
},
status:{
type:Sequelize.INTEGER,
},
},
options:{
tableName: 'movie',
modelName: 'movie',
paranoid: true,
timestamps: true,
createdAt: 'created_at',
updatedAt: 'updated_at',
deletedAt: 'deleted_at',
sequelize,
}
)
export { Movie as MovieModel };