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

const TramoHorario = db.sequelize.define('TRAMOS_HORARIO', {
    ID_TRAMO: {
        primaryKey: true,
        type: Sequelize.INTEGER,
        allowNull: false,
        autoIncrement: true
    },
    ID_HORARIO: {
        type: Sequelize.INTEGER,
        allowNull: false
    },
    HORA_INICIO: {
        type: Sequelize.TIME,
        allowNull: false
    },
    HORA_FIN: {
        type: Sequelize.TIME,
        allowNull: false
    },
    ORDEN: {
        type: Sequelize.INTEGER,
        allowNull: false,
        defaultValue: 1
    }
}, {
    timestamps: false,
    freezeTableName: true
});

module.exports = TramoHorario;
