<?php

namespace App\Services;

use App\Services\Service;
use App\Services\ServiceResponse\ServiceResponse;
use App\DAO\ProfissionalClinicaDAO;

class ProfissionalClinicaService extends Service {

	public function updateProfissionalClinicas(int $idProfissional, int $clinica): ServiceResponse {

		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->updateProfissionalClinica( $idProfissional, $clinica );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;

	}

	public function getClinicasByProfissionalId(int $idProfissional): ServiceResponse {

		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->getClinicasByProfissionalId( $idProfissional );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;

	}

	public function getProfissionaisByUnidadeId(int $idUnidade): ServiceResponse {

		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->getProfissionaisByUnidadeId( $idUnidade );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;

	}

	public function getProfissionalCadastradoClinicaId(int $idProfissional, $clinica): ServiceResponse {

		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->getProfissionalCadastradoClinicaId( $idProfissional, $clinica );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;

	}

	public function excluirProfissionalClinica(int $idProfissional, $clinica): ServiceResponse {

		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->excluirProfissionalClinica( $idProfissional, $clinica );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;

	}
	
	public function incluirProfissionalClinica(int $idProfissional, $clinica): ServiceResponse {
		
		$dao = new ProfissionalClinicaDAO();
		$dao_response = $dao->incluirProfissionalClinica( $idProfissional, $clinica );
		$service_response = new ServiceResponse();
		$service_response = $this->setServiceResponse( $dao_response );
		return $service_response;
	}

}

