text: const { Model, DataTypes } = require('sequelize');
  const sequelize = require('../config/connection');
  
  class Listing extends Model { }
  
  Listing.init(
    {
      id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        primaryKey: true,
        autoIncrement: true,
      },
      title: {
        type: DataTypes.STRING,
        allowNull: false,
      },
      description: {
        type: DataTypes.STRING,
      },
      date_created: {
        type: DataTypes.DATE,
        allowNull: false,
        defaultValue: DataTypes.NOW,
      },
      user_id: {
        type: DataTypes.INTEGER,
        references: {
          model: 'user',
          key: 'id',
        },
      },
      category_id: {
        type: DataTypes.INTEGER,
        references: {
          model: 'category',
          key: 'id',
        },
      },
      status_id: {
        type: DataTypes.INTEGER,
        references: {
          model: 'status',
          key: 'id',
        },
      },
      image_path: {
        type: DataTypes.STRING,
      },
      image_path_two: {
        type: DataTypes.STRING,
      },
      image_path_three: {
        type: DataTypes.STRING,
      },
    },
    {
      sequelize,
      timestamps: false,
      freezeTableName: true,
      underscored: true,
      modelName: 'listing',
    }
  );
  
  module.exports = Listing;
  