Implemented adding the component to the viewer and the search in database. Fixed bug in search of item list
11 lines
296 B
JavaScript
11 lines
296 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const itemSchema = mongoose.Schema({
|
|
name: {type: String, required: true},
|
|
description: {type: String, required: true},
|
|
user: {type: String, required: true},
|
|
cost: {type: Number, required: true}
|
|
});
|
|
|
|
module.exports = mongoose.model('Item', itemSchema);
|