You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
490 B

import { Sequelize } from "sequelize";
import db from "../config/database.js";
const { DataTypes } = Sequelize;
const BlogImage = db.define("blog_images", {
blogId: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: "blogs",
key: "id"
},
onDelete: "CASCADE"
},
imageUrl: {
type: DataTypes.STRING,
allowNull: false
}
}, {
freezeTableName: true
});
export default BlogImage;