49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\InquiryRequest;
|
|
use App\Request\VideoRequest;
|
|
use App\Services\InquiryService;
|
|
use App\Services\VideoService;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
/**
|
|
* 视频
|
|
*/
|
|
class VideoController extends AbstractController
|
|
{
|
|
/**
|
|
* 医生设置视频预约时间
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addVideoReservationDate(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(VideoRequest::class);
|
|
$request->scene('addVideoReservationDate')->validateResolved();
|
|
|
|
$videoService = new VideoService();
|
|
$data = $videoService->addVideoReservationDate();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 创建音视频房间
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function addVideoRoom(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(VideoRequest::class);
|
|
$request->scene('addVideoRoom')->validateResolved();
|
|
|
|
$videoService = new VideoService();
|
|
$data = $videoService->addVideoRoom();
|
|
return $this->response->json($data);
|
|
}
|
|
} |