pieza / restapp

MIT License
1 stars 1 forks source link

Crear entidades de base de datos #4

Closed pieza closed 3 years ago

pieza commented 3 years ago

Crear entidades mongo necesarias para todo el proyecto.

AC:

Ejemplo:

// models/ingredient.js 
const mongoose = require('mongoose')
const { Schema } = mongoose

const IngredientSchema = new Schema({
    name: { type: String, required: true },
    type: { type: String, required: true },
    description: { type: String },
    image_url: { type: String },
    price: { type: Number, required: true },
    zindex: { type: Number, required: true }
})

module.exports = mongoose.model('Ingredient', IngredientSchema)
tr0b commented 3 years ago

Taking over this user story