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

const TitleHistory = sequelize.define('title_history', {
    titleId: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    oldTitle: {
        type: DataTypes.STRING,
        allowNull: false
    },
    changedBy: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    oldUpdatedAt: {
        type: DataTypes.DATE,
        allowNull: false
    }
}, {
    tableName: 'title_history',
    schema: 'forum',
    underscored: true,
    timestamps: false
});

export default TitleHistory;
