zgo/backend/models/item.js

11 lines
296 B
JavaScript
Raw Permalink Normal View History

2022-04-11 14:48:34 +00:00
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);