app2-api/modules/blog/post-category.model.js

20 lines
427 B
JavaScript
Raw Normal View History

2019-04-15 15:58:58 +00:00
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
}
}, {
2019-05-23 09:40:50 +00:00
tableName: 'post_category',
2019-04-15 15:58:58 +00:00
freezeTableName: true,
timestamps: false
});
return PostCategory;
};