text: const mongoose = require('mongoose');
  
  const postSchema = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      title: {
          type: String,
          required: true
      },
      text: {
          type: String,
          required: true
      },
      createdAt: {
          type: Date,
          default: Date.now,
      },
      _createdBy: {
          type: mongoose.Schema.ObjectId,
          ref: 'User'
      },
      comments: [{
          type: mongoose.Schema.ObjectId,
          ref: 'Comment'
      }]
  })
  
  module.exports = mongoose.model('Post', postSchema);