<?php

namespace App\Http\Controllers\Client;

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

class ProjectController extends Controller
{
    protected ProjectService $service;

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

    /**
     * 获取项目详情
     */
    public function detail(Request $request, $id)
    {
        $areaCode = $request->input('area_code');
        return $this->service->getProjectDetail($id, $areaCode);
    }

    /**
     * 获取技师开通的项目列表
     */
    public function coachProjectList(Request $request)
    {
        $coachId = $request->input('coach_id');
        $areaCode = $request->input('area_code');
        return $this->service->getCoachProjectList($coachId, $areaCode);
    }
} 