Skip to content

Instantly share code, notes, and snippets.

@ShivamTyagi12345
Created August 10, 2022 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShivamTyagi12345/01965f589172819257e3b6ea5022159b to your computer and use it in GitHub Desktop.
Save ShivamTyagi12345/01965f589172819257e3b6ea5022159b to your computer and use it in GitHub Desktop.
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