text: const { Model, DataTypes } = require('sequelize');
  const sequelize = require('../config/connection');
  
  class Blog extends Model {}
  
  Blog.init(
    {
      id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        allowNull: false,
        autoIncrement: true,
      },
      title: {
        type: DataTypes.STRING(100),
        allowNull: false,
      },
      content: {
        type: DataTypes.TEXT('medium'),
        allowNull: false,
      },
      creator_id: {
        type: DataTypes.INTEGER,
        references: {
          model: 'User',
          key: 'id',
        },
      },
    },
    {
      sequelize,
      freezeTableName: true,
      underscored: true,
      modelName: 'Blog',
    }
  );
  
  module.exports = Blog;
  