zgo/backend/models/item.js

11 lines
296 B
JavaScript
Raw Normal View History

2021-10-20 20:51:14 +00:00
const mongoose = require('mongoose');
const userSchema = 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', userSchema);