const mongoose = require('mongoose') const timestamp = require('mongoose-timestamp') const postShareSchema = new mongoose.Schema({ postId: { type: mongoose.Schema.Types.ObjectId, ref: 'Post', required: true, index: true, }, userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true, index: true, }, }) postShareSchema.plugin(timestamp) const PostShareModel = mongoose.model('PostShare', postShareSchema) module.exports = PostShareModel