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

const ForumUserPermission = sequelize.define('forum_user_permission', {
    userId: {
        type: DataTypes.INTEGER,
        allowNull: true
    },
    permissionId: {
        type: DataTypes.INTEGER, 
        allowNull: false
    },
    forumId: {
        type: DataTypes.INTEGER,
        allowNull: false
    }}, {
    tableName: 'forum_user_permission',
    schema: 'forum',
    underscored: true
});

export default ForumUserPermission;
