{"size": 604, "ext": "js", "max_stars_repo_path": "Server/adhuri-app/models/post.js", "max_stars_repo_name": "rohaniitr/adhuri", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Server/adhuri-app/models/post.js", "max_issues_repo_name": "rohaniitr/adhuri", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Server/adhuri-app/models/post.js", "max_forks_repo_name": "rohaniitr/adhuri", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.3243243243, "max_line_length": 49, "alphanum_fraction": 0.5927152318}
var bcrypt = require('bcrypt-nodejs');
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/rohan_db');

var PostSchema = new mongoose.Schema({
  userId: {
    type: String,
    required: true
  },
  content: {
    type: String,
    required: true,
    trim : true
  },
  time: {
    type: String,
    required: true
  },
  isOpen: {
    type: Boolean,
    required: true
  },
  tags: [{
    type: String,
    required: true
  }],
  suggestionId: [{
    type: String
  }],
  hashId: [{
    type: String
  }]
});

var Post = mongoose.model('Post', PostSchema);
module.exports = Post;
