text: const { Model, DataTypes } = require('sequelize');
  const sequelize = require('../config/connection');
  
  class Comment extends Model {}
  
  Comment.init(
      {
          id: {
              type: DataTypes.INTEGER,
              allowNull: false,
              primaryKey: true,
              autoIncrement: true
          },
          body: {
              type: DataTypes.STRING,
              allowNull: false,
          },
          date_created: {
              type: DataTypes.DATE,
              allowNull: false,
              defaultValue: DataTypes.NOW
          },
          user_id: {
              type: DataTypes.STRING,
              reference: {
                  model: 'user',
                  key: 'id'
              }
          },
          post_id: {
              type: DataTypes.INTEGER,
              reference: {
                  model: 'blogpost',
                  key: 'id'
              }
          },
      },
      {
          sequelize,
          timestamps: false,
          freezeTableName: true,
          underscored: true,
          modelName: 'comment'
      }
  )
  
  module.exports = Comment;