const mongoose = require('mongoose'); const categorySchema = new mongoose.Schema({ id: { type: String, required: true, unique: true }, name: { type: String, required: true }, description: String, parent: { type: String, default: null } // Parent Category ID }); module.exports = mongoose.model('Category', categorySchema);