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

const Stop = sequelize.define('stops', {
  id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
  name: { type: DataTypes.STRING(100), allowNull: false },
  country: { type: DataTypes.STRING(50), allowNull: false },
  is_border: { type: DataTypes.BOOLEAN, defaultValue: false },
  is_active: { type: DataTypes.BOOLEAN, defaultValue: true },
}, {
  timestamps: true,
  createdAt: 'created_at',
  updatedAt: 'updated_at',
});

module.exports = Stop;
