Files

40 lines
784 B
JavaScript
Raw Permalink Normal View History

2022-04-06 14:09:07 -05:00
const { DataTypes, Model } = require('sequelize');
const sequelize = require('../../config/sequelize.conf');
class Profesor extends Model {}
Profesor.init(
{
idProfesor: {
type: DataTypes.INTEGER,
primaryKey: true,
allowNull: false,
autoIncrement: true,
},
numeroTrabajador: {
type: DataTypes.STRING(10),
allowNull: false,
},
2022-04-17 22:23:39 -05:00
nombre: {
type: DataTypes.STRING(50),
allowNull: false,
},
2022-04-06 14:09:07 -05:00
adscripcion: {
type: DataTypes.STRING(80),
2022-04-17 22:23:39 -05:00
allowNull: false,
2022-04-06 14:09:07 -05:00
},
correo: {
type: DataTypes.STRING(50),
allowNull: true,
2022-04-17 22:23:39 -05:00
defaultValue: null,
2022-04-06 14:09:07 -05:00
},
},
{
sequelize,
modelName: 'Profesor',
tableName: 'profesor',
timestamps: false,
}
);
module.exports = Profesor;