var mongoose = require("mongoose");

var userSchema = new mongoose.Schema({
	auth: String,
	id: String,
	username: String,
	displayName: String,
	firstName: String,
	lastName: String,
	email: String,
	link: String,
	picture: String,
	gender: String,
	usertype: String,
	photos: Array,
	workedWith: Array
});

var jobSchema = new mongoose.Schema({
	user: String,
	dateAdded: Date,
	postingAs: String,
	eventName: String,
	dateTime: Date,
	jobDuration: String,
	location: String,
	description: String,
	useOfPhotos: Array,
	dateRequired: String,
	noOfPhotographers: String
});

var chatSchema = new mongoose.Schema({
	firstUser: String,
	secondUser: String,
	chat: Array
});

var User = mongoose.model('user', userSchema, 'user');
var Job = mongoose.model('job', jobSchema, 'job');
var Chat = mongoose.model('chat', chatSchema, 'chat');

module.exports = {
	User : User,
	Job : Job,
	Chat : Chat
};
@@ -663,24 +663,99 @@
  Array%0A%7D);%0A%0A
+var photoSchema = new mongoose.Schema(%7B%0A%09user: String,%0A%09photos: Array%0A%7D);%0A%0A
 var User = m
@@ -793,24 +793,24 @@
 a, 'user');%0A
-
 var Job = mo
@@ -902,16 +902,75 @@
 'chat');
+%0Avar Photo = mongoose.model('photo', photoSchema, 'photo');
 %0A%0Amodule
@@ -1008,16 +1008,16 @@
  : Job,%0A
-
 %09Chat : 
@@ -1020,11 +1020,27 @@
 t : Chat
+,%0A%09Photo : Photo
 %0A%7D;

add photos schema