<?php
class Amenities
{
    private $conn;
    private $table_name = "amenities";

    public $id;
    public $name; // e.g., 'WiFi', 'Parking'
    public $icon; // URL or icon class

    public function __construct($db)
    {
        $this->conn = $db;
    }

    public function readAll()
    {
        $query = "SELECT * FROM " . $this->table_name;
        $stmt = $this->conn->prepare($query);
        $stmt->execute();
        return $stmt;
    }
}
?>