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.
 
 

33 lines
556 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({
idProduct: {
type: Schema.ObjectId,
ref: "Supply"
},
idProvider: {
type: Schema.ObjectId,
ref: "Provider"
},
amount: {
type: Number,
},
date: {
type: Date
},
quantity: {
type: Number,
},
description: {
type: String,
},
});
const model = mongoose.model("Order", supplySchema);
module.exports = model;