const mongoose = require('mongoose');

const amazonCategorySchema = new mongoose.Schema({
  category: { type: String },
  image: { type: String },     // <-- Add this
  slug: { type: String },      // <-- Add this
  subCategory: [
    {
      name: { type: String },
      image: { type: String },
      slug: { type: String },
      subCategory: [
        {
          name: { type: String },
          image: { type: String },
          slug: { type: String },
          subCategory: [
            {
              name: { type: String },
              image: { type: String },
              slug: { type: String },
              subCategory: []
            }
          ]
        }
      ]
    }
  ]
}, { timestamps: true, collection: 'amazonCategories' });


module.exports = mongoose.model('amazonCategory', amazonCategorySchema);
