Sup_File/models/Book.js
2018-05-03 16:15:57 +02:00

24 lines
370 B
JavaScript

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);