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

const Message = sequelize.define('message', {
    text: {
        type: DataTypes.TEXT,
        allowNull: false
    },
    createdBy: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    titleId: {
        type: DataTypes.INTEGER,
        allowNull: false
    }
}, {
    tableName: 'message',
    schema: 'forum',
    underscored: true,
    timestamps: true
});

export default Message;
