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
      },
      content: {
          type: DataTypes.STRING,
          allowNull: false,
          validate: {
              len: [1]
          }
      },
      user_id: {
          type: DataTypes.INTEGER,
          allowNull: false,
          references: {
              model: 'User',
              key: 'id'
          }
      },
      blogpost_id: {
          type: DataTypes.INTEGER,
          allowNull: false,
          references: {
              model: 'Post',
              key: 'id'
          }
      }
  }, {
      sequelize,
      freezeTableName: true,
      underscored: true,
      modelName: 'comment'
  })
  
  
  module.exports = Comment;