68 lines
1.2 KiB
PHP
68 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Link;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* A medicine holder (titulaire of an AMM).
|
|
*/
|
|
#[ORM\Entity]
|
|
class MedicineHolder
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column(type: 'integer')]
|
|
private ?int $id = null;
|
|
|
|
/**
|
|
* This CIS (Code Identifiant de Spécialité) id is the unique identifier of the medicine.
|
|
*/
|
|
#[ORM\Column(type: 'string', length: 11)]
|
|
private ?string $CIS = null;
|
|
|
|
#[ORM\Column]
|
|
private string $name = '';
|
|
|
|
/** The medicament this entity holds */
|
|
#[ORM\ManyToOne(inversedBy: 'holders')]
|
|
private ?MedicineSpeciality $medicine;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getCIS(): ?string
|
|
{
|
|
return $this->CIS;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
|
|
public function setCIS(string $CIS): self
|
|
{
|
|
$this->CIS = $CIS;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function setName(string $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
}
|