File size: 300 Bytes
97f53b4
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
const mongoose = require('mongoose');

const postSchema = new mongoose.Schema({
    postId: {
        type: mongoose.Schema.Types.ObjectId, ref: 'User'
    },
    postedBy: String,
    caption: String,
    imageUrl: String,
    liked: String,
});

module.exports = mongoose.model('Post', postSchema);