

-- 2) Card-to-Card requests
CREATE TABLE IF NOT EXISTS topup_requests (
  id INT AUTO_INCREMENT PRIMARY KEY,
  chat_id BIGINT NOT NULL,
  amount BIGINT NOT NULL,
  photo_file_id VARCHAR(200) NOT NULL,
  status ENUM('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  decided_at DATETIME NULL,
  admin_id BIGINT NULL,
  INDEX (chat_id),
  INDEX (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3) Optional tracking
ALTER TABLE user ADD COLUMN IF NOT EXISTS last_seen DATETIME NULL;
