Files
Tiemen van Olst 72d9f5e642 Added Docker
2025-09-09 08:52:28 +02:00

9 lines
233 B
JavaScript

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 };