zgo/backend/models/item.js

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