const insertShelving = require('./insertShelving');
const bindShelving = require('./bindShelving');
const filter = require('./filter');
const insertDB = require('./db/insertDB')

function bindShelvingTag(barcode, shelving, level){
    if(filter.isBarcode(barcode)){
        if(filter.isShelving(shelving)){
            bindShelving.bindShelving(barcode, shelving, level);
            insertShelving.insertShelving(shelving, level);
            //insertDB.insertDB(barcode, shelving, level);
        }else{
            console.log("¡MATRICULA INCORRECTA!")
        }
    }else{
        console.log("¡CODIGO DE ETIQUETA INCORRECTO!")
    }
}
///DATOS INTRODUCIDOS POR EL USUARIO////
var barcode = "A0A3B8224DFF"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
var shelving = "ABC";   //valido = 3 CARACTERES LETRAS (A-Z)
var level = "4";
//////////////////////////////////////

bindShelvingTag(barcode, shelving, level);


