2018-04-28 14:44:33 +00:00
|
|
|
const mongoose = require('mongoose');
|
|
|
|
|
|
|
|
const Schema = mongoose.Schema;
|
|
|
|
|
|
|
|
const Photo = new Schema({
|
2018-06-23 11:19:14 +00:00
|
|
|
frame_id: {type: Schema.Types.ObjectId, ref: 'Frame'},
|
2018-04-28 14:44:33 +00:00
|
|
|
contentType: String,
|
2018-06-23 11:19:14 +00:00
|
|
|
user: {type: Schema.Types.ObjectId, ref: 'User'},
|
2018-04-28 14:44:33 +00:00
|
|
|
photo: Buffer,
|
|
|
|
// thumbnail: Buffer,
|
|
|
|
timestamp: Number
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = mongoose.model('Photo', Photo);
|