Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
363 B
0
Indexable
Never
// models/Review.js

const mongoose = require('mongoose');

const reviewSchema = new mongoose.Schema({
    breweryId: { type: mongoose.Schema.Types.ObjectId, ref: 'Brewery' },
    rating: { type: Number, required: true },
    description: String,
    // other fields as needed
});

const Review = mongoose.model('Review', reviewSchema);

module.exports = Review;
Leave a Comment