<?php

namespace App\Http\Controllers\Client;

use App\Http\Controllers\Controller;
use App\Services\Client\CoachService;
use Illuminate\Http\Request;

class CoachController extends Controller
{
    protected CoachService $service;

    public function __construct(CoachService $service)
    {
        $this->service = $service;
    }

    /**
     * 获取技师列表
     */
    public function list(Request $request)
    {
        $latitude = $request->input('latitude');
        $longitude = $request->input('longitude'); 
        return $this->service->getCoachList($latitude, $longitude);
    }

    /**
     * 获取技师详情
     */
    public function detail(Request $request, $id)
    {
        $latitude = $request->input('latitude');
        $longitude = $request->input('longitude');
        return $this->service->getCoachDetail($id, $latitude, $longitude);
    }
} 