You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
contacts_express_mongo_temp.../models/holidays.js

12 lines
361 B

const mongoose = require('mongoose')
const holidaySchema = mongoose.Schema({
name: { type: String, required: true },
celebrated: { type: Boolean, default: false },
description: { type: String, default: 'Best holiday ever!' },
likes: { type: Number, default: 0 },
tags: [{ type: String }]
})
module.exports = mongoose.model('Holiday', holidaySchema)