text: const { Model, DataTypes } = require('sequelize');
  const sequelize = require('../config/connection');
  
  class Comment extends Model {}
  
  Comment.init(
      {
          id: {
              type: DataTypes.INTEGER,
              primaryKey: true,
              autoIncrement: true
          },
          user_comment: {
              type: DataTypes.TEXT,
              allowNull: false,
              validate: {
                  len: [1]
              }
          },
          user_id: {
              type: DataTypes.INTEGER,
              allowNull: false,
              refrences: {
                  model: 'user',
                  key: 'key'
              }
          },
         post_id: {
              type: DataTypes.INTEGER,
              allowNull: false,
              refrences: {
                  model: 'post',
                  key: 'key'
              }
          },
          date_created: {
              type: DataTypes.DATE,
              allowNull: false,
              defaultValue: DataTypes.NOW,
          },
      },
      {
          sequelize,
          freezeTableName: true,
          underscored: true,
          modelName: 'comment'
      }
  );
  
  module.exports = Comment;