Skip to content
Snippets Groups Projects
Commit 0728bd9b authored by Ashwanth K's avatar Ashwanth K
Browse files

Upload New File

parent ba8fb010
No related branches found
No related tags found
No related merge requests found
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const bookSchema = new Schema({
_id : {type: String,required: true},
book_name: { type: String,unique: true, required: true },
author: { type: String, required: true },
price: {type: Number, required: true},
}, {
timestamps: true,
});
const Book = mongoose.model('Book', bookSchema);
module.exports = Book;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment