module.exports = function (sequelize, DataTypes) { const PostCategory = sequelize.define( "PostCategory", { postId: { type: DataTypes.UUID, primaryKey: true, foreignKey: true, }, categoryId: { type: DataTypes.INTEGER, primaryKey: true, foreignKey: true, }, }, { tableName: "posts_categories", freezeTableName: true, timestamps: false, } ); return PostCategory; };