const mongoose = require('mongoose');

const productReviewSchema = new mongoose.Schema({
    product: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Product',
        required: true,
    },
    review: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Review',
      required: true,
    }
}, {
    timestamps: true,
    collection: 'productReviews'
})

module.exports = mongoose.model("ProductReview", productReviewSchema);