Created
August 10, 2022 13:18
-
-
Save ShivamTyagi12345/01965f589172819257e3b6ea5022159b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
const dogSchema = new Schema({ | |
title: { | |
type: String, | |
required: true, | |
}, | |
snippet: { | |
type: String, | |
required: true, | |
}, | |
body: { | |
type: String, | |
required: true | |
}, | |
}, { timestamps: true }); | |
const Dog = mongoose.model('dog', dogSchema); | |
module.exports = Dog; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment