framez-server/Server/Schemas/Photo.js

15 lines
346 B
JavaScript
Raw Permalink Normal View History

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);