Sup_File/models/Book.js

24 lines
370 B
JavaScript
Raw Normal View History

2018-05-03 14:15:57 +00:00
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var BookSchema = new Schema({
isbn: {
type: String,
required: true
},
title: {
type: String,
required: true
},
author: {
type: String,
required: true
},
publisher: {
type: String,
required: true
}
});
module.exports = mongoose.model('Book', BookSchema);