<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CategoryEntityRepository")
*/
class CategoryEntity
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $entity_id;
/**
* @ORM\Column(type="string", length=32)
*/
private $entity_type;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="categoryEntities", fetch="EAGER")
* @ORM\JoinColumn(nullable=false, name="category_id", referencedColumnName="id")
*/
private $category;
public function getId(): ?int
{
return $this->id;
}
public function getEntityId(): ?int
{
return $this->entity_id;
}
public function setEntityId(int $entity_id): self
{
$this->entity_id = $entity_id;
return $this;
}
public function getEntityType(): ?string
{
return $this->entity_type;
}
public function setEntityType(string $entity_type): self
{
$this->entity_type = $entity_type;
return $this;
}
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(?Category $category): self
{
$this->category = $category;
return $this;
}
}