2021-10-20 20:51:14 +00:00
|
|
|
const mongoose = require('mongoose');
|
|
|
|
|
2021-10-25 20:01:06 +00:00
|
|
|
const itemSchema = mongoose.Schema({
|
2021-10-20 20:51:14 +00:00
|
|
|
name: {type: String, required: true},
|
|
|
|
description: {type: String, required: true},
|
|
|
|
user: {type: String, required: true},
|
|
|
|
cost: {type: Number, required: true}
|
|
|
|
});
|
|
|
|
|
2021-10-25 20:01:06 +00:00
|
|
|
module.exports = mongoose.model('Item', itemSchema);
|