This repository has been archived on 2021-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
SA3/hw6/Claudio_Maggioni/models/Favorites.js

21 lines
427 B
JavaScript
Raw Normal View History

2019-10-28 14:00:36 +00:00
// 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);