const { DataTypes } = require('sequelize');
const { sequelize } = require('../config/database');

const RouteStop = sequelize.define('route_stops', {
  id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
  route_id: { type: DataTypes.INTEGER, allowNull: false },
  stop_id: { type: DataTypes.INTEGER, allowNull: false },
  order: { type: DataTypes.INTEGER, allowNull: false },
  distance_from_previous_km: { type: DataTypes.INTEGER },
}, {
  timestamps: false,
});

module.exports = RouteStop;
