<?php
namespace App\Entity;
use App\Repository\DataInpiRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DataInpiRepository::class)]
class DataInpi
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private array $data = [];
#[ORM\OneToOne(inversedBy: 'dataInpi', cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(nullable: false)]
private ?InformationEntreprise $information_entreprise = null;
public function getId(): ?int
{
return $this->id;
}
public function getData(): array
{
return $this->data;
}
public function setData(?array $data): self
{
$this->data = $data;
return $this;
}
public function getInformationEntreprise(): ?InformationEntreprise
{
return $this->information_entreprise;
}
public function setInformationEntreprise(InformationEntreprise $information_entreprise): self
{
$this->information_entreprise = $information_entreprise;
return $this;
}
public function __toString()
{
return "Data INPI #" . ($this->getInformationEntreprise()->getDenominationUl() ? $this->getInformationEntreprise()->getDenominationUl() : $this->getInformationEntreprise()->getPremiereLigneAdresse());
}
}