{"size": 637, "ext": "js", "max_stars_repo_path": "modules/pages/server/models/page.server.model.js", "max_stars_repo_name": "akash58/Hops", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "modules/pages/server/models/page.server.model.js", "max_issues_repo_name": "akash58/Hops", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "modules/pages/server/models/page.server.model.js", "max_forks_repo_name": "akash58/Hops", "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": 15.5365853659, "max_line_length": 46, "alphanum_fraction": 0.5824175824}
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
  Schema = mongoose.Schema;
//	crypto = require('crypto');


/**
 * User Schema
 */
var PageSchema = new Schema({
  created: {
    type: Date,
    default: Date.now
  },
  roles: {
    type: [{
      type: String
    }],
    default: ['admin']
  },
  pageName: {
    type: String,
    trim: true
		// unique: true,
		// required: 'Page Name cannot be blank'
  },
  user: {
    type: Schema.ObjectId,
    ref: 'User'
  }
});

// mongoose.model('Page', PageSchema);
module.exports = function(connection) {
  return connection.model('Page', PageSchema);
};
