const mongoose = require('mongoose') const timestamp = require('mongoose-timestamp') const postSendSchema = new mongoose.Schema({ postId: { type: mongoose.Schema.Types.ObjectId, ref: 'Post', required: true, index: true, }, senderId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true, index: true, }, receiverId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true, index: true, }, }) postSendSchema.plugin(timestamp) const PostSendModel = mongoose.model('PostSend', postSendSchema) module.exports = PostSendModel