src/Entity/Company.php line 9
<?phpnamespace App\Entity;use App\Repository\CompanyRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CompanyRepository::class)]class Company{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\OneToOne(mappedBy: 'company', cascade: ['persist', 'remove'])]private ?SriInfo $sriInfo = null;#[ORM\ManyToOne(inversedBy: 'companies')]#[ORM\JoinColumn(nullable: false)]private ?User $owner = null;public function getId(): ?int{return $this->id;}public function getSriInfo(): ?SriInfo{return $this->sriInfo;}public function setSriInfo(?SriInfo $sriInfo): static{// unset the owning side of the relation if necessaryif ($sriInfo === null && $this->sriInfo !== null) {$this->sriInfo->setCompany(null);}// set the owning side of the relation if necessaryif ($sriInfo !== null && $sriInfo->getCompany() !== $this) {$sriInfo->setCompany($this);}$this->sriInfo = $sriInfo;return $this;}public function getOwner(): ?User{return $this->owner;}public function setOwner(?User $owner): static{$this->owner = $owner;return $this;}}