listo, faltan correo y pruebas
This commit is contained in:
@@ -20,12 +20,14 @@ const dataUsuarios = async () => {
|
||||
const dataProfesores = async () => {
|
||||
let usuario = ['4163132', '123456778', '1234567890'];
|
||||
let adscripcion = ['Adscripcion 1', 'Adscripcion 2', 'Adscripcion 3'];
|
||||
let nombre = ['Nombre 1', 'Nombre 2', 'Nombre 3'];
|
||||
let correo = ['correo 1', 'correo 2', 'correo 3'];
|
||||
|
||||
for (let i = 0; i < usuario.length; i++) {
|
||||
await Profesor.create({
|
||||
numeroTrabajador: usuario[i],
|
||||
adscripcion: adscripcion[i],
|
||||
nombre: nombre[i],
|
||||
correo: correo[i],
|
||||
numeroInvitados: i+1,
|
||||
});
|
||||
|
||||
@@ -16,19 +16,27 @@ Profesor.init(
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
},
|
||||
nombre: {
|
||||
type: DataTypes.STRING(50),
|
||||
allowNull: false,
|
||||
},
|
||||
adscripcion: {
|
||||
type: DataTypes.STRING(80),
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
},
|
||||
correo: {
|
||||
type: DataTypes.STRING(50),
|
||||
allowNull: true,
|
||||
defaultValue: null
|
||||
defaultValue: null,
|
||||
},
|
||||
numeroInvitados: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true
|
||||
}
|
||||
allowNull: true,
|
||||
},
|
||||
numeroInvitadosDentro: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
@@ -38,5 +46,4 @@ Profesor.init(
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
module.exports = Profesor;
|
||||
|
||||
Reference in New Issue
Block a user