Files
censo2020Back/helpers/tables/Marca.js
T
2020-09-10 03:06:23 -05:00

36 lines
749 B
JavaScript

const Marca = require('../../server/models/tablas/Marca');
async function fillMarca() {
let count = 1;
let limit = 11;
let marcas = [
"HP",
"ECOIN",
"SONY",
"LENOVO",
"DELL",
"ACER",
"ASUS",
"APPLE",
"COMPAQ",
"GATEWAY",
"IBM"
];
console.log('\n\tFilling out «marca».'.cyan.italic.bold);
for (marca of marcas) {
await Marca.create({
marca
})
.then(() => {
console.log(`${ count }/${ limit }\trecords created.`);
count++;
})
.catch(() => {
throw new Error();
});
};
};
module.exports = fillMarca;