<?php
namespace App\Entity;
use App\Repository\LabTestMethodRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LabTestMethodRepository::class), ORM\Table(name: 'lab_test_methods')]
class LabTestMethod implements \Stringable
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: LabTest::class), ORM\JoinColumn(nullable: false)]
private $test;
#[ORM\ManyToOne(targetEntity: TestMethod::class, inversedBy: 'methods'), ORM\JoinColumn(nullable: false)]
private $method;
public function getId(): ?int
{
return $this->id;
}
public function getTest(): ?LabTest
{
return $this->test;
}
public function setTest(?LabTest $test): self
{
$this->test = $test;
return $this;
}
public function getMethod(): ?TestMethod
{
return $this->method;
}
public function setMethod(?TestMethod $method): self
{
$this->method = $method;
return $this;
}
public function __toString(): string
{
return $this->getMethod();
}
}