59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
const { DataTypes, Model } = require('sequelize');
|
|
const sequelize = require('../../config/sequelize.conf');
|
|
const Usuario = require('./Usuario');
|
|
|
|
class Investigador extends Model {}
|
|
Investigador.init(
|
|
{
|
|
idInvestigador: {
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
unique: true,
|
|
autoIncrement: true,
|
|
},
|
|
nombre: {
|
|
type: DataTypes.STRING(50),
|
|
allowNull: false,
|
|
},
|
|
apellidoP: {
|
|
type: DataTypes.STRING(50),
|
|
allowNull: false,
|
|
},
|
|
apellidoM: {
|
|
type: DataTypes.STRING(50),
|
|
allowNull: false,
|
|
},
|
|
noTrabajador: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
unique: true,
|
|
},
|
|
RFC: {
|
|
type: DataTypes.STRING(70),
|
|
allowNull: false,
|
|
unique: true,
|
|
},
|
|
ubicacion: {
|
|
type: DataTypes.STRING(200),
|
|
allowNull: false,
|
|
},
|
|
fotografia: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
},
|
|
activo: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
},
|
|
},
|
|
{
|
|
sequelize,
|
|
modelName: 'Investigador',
|
|
tableName: 'investigador',
|
|
timestamps: false,
|
|
}
|
|
);
|
|
|
|
module.exports = Investigador;
|