Aplicación para llevar a cabo el stock de la fábrica
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
799 B

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