const db = require('../config/database');

class Tour {
  static async getAllTours() {
    const [rows] = await db.query('SELECT * FROM tours');
    return rows;
  }

  static async getTourById(id) {
    const [rows] = await db.query('SELECT * FROM tours WHERE id = ?', [id]);
    return rows[0];
  }
}

module.exports = Tour;
