src/Entity/DataInpi.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DataInpiRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassDataInpiRepository::class)]
  6. class DataInpi
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(nullabletrue)]
  13.     private array $data = [];
  14.     #[ORM\OneToOne(inversedBy'dataInpi'cascade: ['persist''remove'])]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?InformationEntreprise $information_entreprise null;
  17.     public function getId(): ?int
  18.     {
  19.         return $this->id;
  20.     }
  21.     public function getData(): array
  22.     {
  23.         return $this->data;
  24.     }
  25.     public function setData(?array $data): self
  26.     {
  27.         $this->data $data;
  28.         return $this;
  29.     }
  30.     public function getInformationEntreprise(): ?InformationEntreprise
  31.     {
  32.         return $this->information_entreprise;
  33.     }
  34.     public function setInformationEntreprise(InformationEntreprise $information_entreprise): self
  35.     {
  36.         $this->information_entreprise $information_entreprise;
  37.         return $this;
  38.     }
  39.     public function __toString()
  40.     {
  41.         return "Data INPI #" . ($this->getInformationEntreprise()->getDenominationUl() ? $this->getInformationEntreprise()->getDenominationUl() : $this->getInformationEntreprise()->getPremiereLigneAdresse());
  42.     }
  43. }