//En este modulo se declara la estructura de los datos que ingresaran a la BD const mongoose = require("mongoose"); const Schema = mongoose.Schema; const supplySchema = new Schema({ name: { type: String, //required: true }, unity: { type: String, }, providers: [{ type: Schema.ObjectId, ref: 'Provider' }], code: { type: String, }, dateSupply: Date, statusDB: { type: Boolean, required: true, }, imageSupply: { type: String, }, category: { type: Schema.ObjectId, ref: "Categories", }, description: { type: String, }, location: { type: String, }, note: { type: String, }, quantity: { type: Number, }, }); const model = mongoose.model("Supply", supplySchema); module.exports = model;