text: const { Model, DataTypes } = require('sequelize');
  const sequelize = require('../config/connection');
  
  class Post extends Model {}
  
  Post.init(
    {
      id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        primaryKey: true,
        autoIncrement: true
      },
      title: {
        type: DataTypes.STRING
      },
      post: {
        type: DataTypes.TEXT('long')
      },
      tagline: {
        type: DataTypes.STRING
      },
      claps: {
        type: DataTypes.INTEGER
      },
      status: {
        type: DataTypes.BOOLEAN
      },
      user_id: {
        type: DataTypes.INTEGER,
        references: {
          model: 'user',
          key: 'id',
        },
      }
    },
    {
      sequelize,
      timestamps: true,
      freezeTableName: true,
      underscored: true,
      modelName: 'post',
    }
  );
  
  module.exports = Post;
  