20 lines
427 B
JavaScript
20 lines
427 B
JavaScript
// vim: set ts=2 sw=2 et tw=80:
|
|
|
|
const mongoose = require('mongoose');
|
|
|
|
const schema = new mongoose.Schema({
|
|
_id: {},
|
|
dataURL: { type: String, required: true },
|
|
name: { type: String, required: true, default: '' },
|
|
bookmarked: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
dateCreated: { type: Date, required: true, default: Date.now }
|
|
});
|
|
|
|
const Favorite = mongoose.model('Favorite', schema);
|
|
|
|
|
|
|