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

const MessageHistory = sequelize.define('message_history', {
    messageId: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    oldText: {
        type: DataTypes.TEXT,
        allowNull: false
    },
    changedBy: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    oldUpdatedAt: {
        type: DataTypes.DATE,
        allowNull: false
    }
}, {
    tableName: 'message_history',
    schema: 'forum',
    underscored: true,
    timestamps: false
});

export default MessageHistory;
