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/contact.js

16 lines
361 B

const mongoose = require('mongoose')
// TODO: Update to your resource name
const contactSchema = mongoose.Schema(
// TODO: update your resource properties
{
name: { type: String, required: true },
age: { type: Number, default: 0 }
},
{ timestamps: true }
)
// TODO: update your model
module.exports = mongoose.model('Contact', contactSchema)