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

const Title = sequelize.define('title', {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    title: {
        type: DataTypes.STRING,
        allowNull: false
    },
    createdBy: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    forumId: {
        type: DataTypes.INTEGER,
        allowNull: false
    }
}, {
    tableName: 'title',
    schema: 'forum',
    underscored: true,
    timestamps: true});

export default Title;
