text: 'use strict';
  var mongoose = require('mongoose');
  
  var postSchema = new mongoose.Schema({
    creator: {
      type: String
    },
  
    creatorUID: {
      type: String
    },
  
    title: {
      type: String
    },
  
    url: {
      type: String
    },
  
    time: {
      type: Date,
      default: Date.now,
      index: true
    },
  
    comments:
      [{
        body: String,
        date: Date
      }],
  
    commentCount: {
      type: Number,
      index: true
    },
  
    upvotes: {
        type: Number,
        index: true
    },
  
    downvotes:  Number,
  
    favs: Number
  
  });
  
  
  module.exports = postSchema;
  