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

var gallerySchema = new Schema({
	"name" : String,
	"type" : String,
	"mainImageUrl" : String,
	"thumbnails" : Array,
	"images" : Array,
	"user" : {
	 	type: Schema.Types.ObjectId,
	 	ref: 'user'
	}
});

module.exports = mongoose.model('gallery', gallerySchema);
@@ -94,17 +94,40 @@
 Schema(%7B
-%0D
+%0A  %22reference%22: String,%0A
 %09%22name%22 
@@ -135,17 +135,17 @@
  String,
-%0D
+%0A
 %09%22type%22 
@@ -153,17 +153,17 @@
  String,
-%0D
+%0A
 %09%22mainIm
@@ -179,17 +179,17 @@
  String,
-%0D
+%0A
 %09%22thumbn
@@ -202,17 +202,17 @@
 : Array,
-%0D
+%0A
 %09%22images
@@ -221,17 +221,17 @@
 : Array,
-%0D
+%0A
 %09%22user%22 
@@ -233,17 +233,17 @@
 ser%22 : %7B
-%0D
+%0A
 %09 %09type:
@@ -265,17 +265,17 @@
 bjectId,
-%0D
+%0A
 %09 %09ref: 
@@ -284,12 +284,12 @@
 ser'
-%0D%09%7D%0D
+%0A%09%7D%0A
 %7D);%0A
@@ -347,8 +347,9 @@
 Schema);
+%0A

Add reference