This commit is contained in:
payacom
2026-08-31 20:45:41 +03:30
parent fa9f23c61d
commit 3f416a7a60
367 changed files with 621895 additions and 6443 deletions

28
models/PostSendModel.js Normal file
View File

@@ -0,0 +1,28 @@
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