const Sequelize = require('sequelize');
var db = require("../database/db.js");

const Estudio = db.sequelize.define('ESTUDIO', {

    
    ID_ESTUDIO: {
        primaryKey: true,
        type: Sequelize.BIGINT,
        allowNull: false,
        autoIncrement: true
    },

    ID_USUARIO: {
        type: Sequelize.INTEGER,
        allowNull: false,
    },

    TITULO: {
        type: Sequelize.STRING,
        allowNull: false,
    },

    INSTITUCION: {
        type: Sequelize.STRING,
        allowNull: false,
    },

   
    FECHA_INICIO: {
        type: Sequelize.DATEONLY,
        allowNull: false,
    },
    FECHA_FIN: {
        type: Sequelize.DATEONLY,
        allowNull: false,
    },

    FECHA_GRADUACION: {
        type: Sequelize.DATEONLY,
        allowNull: false,
    },

    AREA_ESTUDIO: {
        type: Sequelize.STRING,
        allowNull: false,
    },

    NIVEL: {
        type: Sequelize.STRING,
        allowNull: false,
    },

    GRADO: {
        type: Sequelize.STRING,
        allowNull: false,
    },

    ANIOS_ESTUDIO: {
        type: Sequelize.INTEGER,
        allowNull: false,
    },
    REGISTRO_SENESCYT: {
    type: Sequelize.STRING(100),
    allowNull: true
    },

    FECHA_REGISTRO: {
        type: Sequelize.STRING,
        allowNull: false,
    },
   
},
    {
        timestamps: false,
        id: false
    })


   

module.exports = Estudio;