<commit_before>exports._project = function(api, next){

  var mongoose = require('mongoose');

  var uri = process.env.MONGOLAB_URI
      || 'mongodb://localhost/forest';


  var orgSchema = {
      name: String,
      printers: [ mongoose.Schema.Types.ObjectId ],
      users: [ mongoose.Schema.Types.ObjectId ],
      public: Boolean
  };

  var printerSchema = {
      name: String,
      location: String,
      ipAddress: String,
      statuses: [ {
        timeStamp: Date,
        status: String,
        pageCount: Number,
        tonerLevel: Number
      } ],
      manufacturer: String,
      model: String
  };

  var userSchema = {
      name: String,
      email: String,
      password: <PASSWORD>,
      admin: Boolean
  };

  var appSchema = {
      name: String,
      description: String,
      user: mongoose.Schema.Types.ObjectId,
      key: String
  }

  mongoose.connect(uri);

  mongoose.model('Organization', orgSchema);
  mongoose.model('Printer', printerSchema);
  mongoose.model('User', userSchema);
  mongoose.model('App', appSchema);

  api.mongoose = mongoose;
<commit_msg>Add ObjectId to api for more concise code<commit_after>exports._project = function(api, next){

  var mongoose = require('mongoose');

  var uri = process.env.MONGOLAB_URI
      || 'mongodb://localhost/forest';


  var orgSchema = {
      name: String,
      printers: [ mongoose.Schema.Types.ObjectId ],
      users: [ mongoose.Schema.Types.ObjectId ],
      public: Boolean
  };

  var printerSchema = {
      name: String,
      location: String,
      ipAddress: String,
      statuses: [ {
        timeStamp: Date,
        status: String,
        pageCount: Number,
        tonerLevel: Number
      } ],
      manufacturer: String,
      model: String
  };

  var userSchema = {
      name: String,
      email: String,
      password: <PASSWORD>,
      admin: Boolean
  };

  var appSchema = {
      name: String,
      description: String,
      user: mongoose.Schema.Types.ObjectId,
      key: String
  }

  mongoose.connect(uri);

  mongoose.model('Organization', orgSchema);
  mongoose.model('Printer', printerSchema);
  mongoose.model('User', userSchema);
  mongoose.model('App', appSchema);

  api.mongoose = mongoose;
  api.ObjectId = mongoose.Types.ObjectId;

{'fraction_non_alphanumeric': 0.12082601054481547, 'fraction_numerical': 0.0, 'mean_word_length': 2.5578125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7115733', 'n_tokens_mistral': 713, 'n_tokens_neox': 714, 'n_words': 153}