var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var Hackathon = new mongoose.Schema({
	name: String,
	desc: String,
	start: Date,
	end: Date,
	location: String,
	address: String,
	register_url: String,
	website: String,
	created: { type: Date, default: Date.now },
	updated: { type: Date, default: Date.now }
});

module.exports = mongoose.model('Hackathon', Hackathon);

@@ -191,16 +191,53 @@
 String,%0A
+%09geo: %7Btype: %5BNumber%5D, index: '2d'%7D,%0A
 %09registe
@@ -363,16 +363,168 @@
  %7D%0A%7D);%0A%0A
+Hackathon.methods.findNear = function(cb) %7B%0A%09return this.model('Place').find(%7B%0A%09%09geo: %7B%0A%09%09%09$nearSphere: this.geo,%0A%09%09%09$maxDistance: 0.01%0A%09%09%7D%0A%09%7D, cb);%0A%7D%0A%0A
 module.e

add geolocation field to models