const mongoose = require('mongoose');
const jwt = require("jsonwebtoken");

const { mongooseConstantValues } = require('../apps/common/systemConstents')
const IndiaOffshelfScheme = new mongoose.Schema({
	orderId: { type: String },
    sku: { type: String },
    productName: { type: String },
    createdDate: { type: Date, default: Date.now },
    amount: { type: Number },
    shelfNumber: { type: String },
    incNumber: { type: Number },
    orderSerial: { type: String },
    mkpOrderId: { type: String },
    op_status: {type: Number, default: 0},
    quantity: {type: Number, default: 0},
    scanQuantity: {type: Number, default: 0},
    shelflocation: {type: String},
    sort: {type: Number, default: 0},
    trackingNumber: {type: String},
    shippingMethod: {type: String},
    bin: {type: String},
});
IndiaOffshelfScheme.post(['save','insertMany'],async function (doc){
    try{
        let orders = [];
        if(Array.isArray(doc)){
          orders = doc;
        } else {
          orders = [doc];
        }
       
    } catch(err){
        console.log(err);
    }
  });
module.exports = mongoose.model('Indiaoffshelfs', IndiaOffshelfScheme)