const mongoose = require('mongoose'); const Schema = mongoose.Schema; const Photo = new Schema({ frame_id: {type: Schema.Types.ObjectId, ref: 'Frame'}, contentType: String, user: {type: Schema.Types.ObjectId, ref: 'User'}, photo: Buffer, // thumbnail: Buffer, timestamp: Number }); module.exports = mongoose.model('Photo', Photo);