text: 
  const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  
  const PostSchema = new Schema({
  
      user: {
          type: Schema.Types.ObjectId,
          ref: 'user'
      },
  
      name: String,
      avatar: String,
  
      text: {
          type: String,
          required: true
      },
  
      likes: [
          {
              user: {
                  type: Schema.Types.ObjectId,
                  ref: 'user'
              }
          }
      ],
  
      comments: [
          {
              user: {
                  type: Schema.Types.ObjectId,
                  ref: 'user'
              },
  
              text: {
                  type: String,
                  required: true
              },
  
              name: String,
              avatar: String,
  
              date: {
                  type: Date,
                  default: Date.now
              }
          }
      ],
  
      date: {
          type: Date,
          default: Date.now
      }
  });
  
  module.exports = Post = mongoose.model('post', PostSchema);