Added Docker
This commit is contained in:
8
server/database/models/index.js
Normal file
8
server/database/models/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import User from './User.js';
|
||||
import Post from './Post.js';
|
||||
|
||||
// Define associations
|
||||
User.hasMany(Post, { foreignKey: 'authorId', as: 'posts' });
|
||||
Post.belongsTo(User, { foreignKey: 'authorId', as: 'author' });
|
||||
|
||||
export { User, Post };
|
||||
Reference in New Issue
Block a user