import { sequelize } from '../../utils/sequelize.js';
import { DataTypes } from 'sequelize';

const ForumForumPermission = sequelize.define('forum_forum_permission', {
    forumId: {
        type: DataTypes.INTEGER,
        allowNull: false,
        references: {
            model: 'forum',
            key: 'id' 
        }
    },
    permissionId: {
        type: DataTypes.INTEGER,
        allowNull: false, 
        references: { 
            model: 'forum_permission',
            key: 'id'
        }
    }
}, {
    tableName: 'forum_forum_permission',
    schema: 'forum',
    underscored: true
});

export default ForumForumPermission;
