<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\ChannelCategoryRepository") * * @ORM\HasLifecycleCallbacks() */class ChannelCategory{ public function __construct() { } /** * @ORM\Id() * * @ORM\GeneratedValue() * * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="integer", nullable=false) */ private $position = 0; public function getId(): ?int { return $this->id; } public function getPosition() { return $this->position; } public function setPosition($position) { $this->position = $position; return $this; } /** * @ORM\Column(type="datetime", nullable=false) */ private $created_at; /** * @ORM\Column(type="datetime", nullable=true) */ private $updated_at = null; public function getCreatedAt(): \DateTimeInterface { return $this->created_at; } public function setCreatedAt(\DateTimeInterface $created_at): self { $this->created_at = $created_at; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updated_at; } public function setUpdatedAt(?\DateTimeInterface $updated_at): self { $this->updated_at = $updated_at; return $this; } /** * @ORM\PrePersist */ public function setCreatedAtValue() { $this->setCreatedAt(new \DateTime()); } /** * @ORM\PreUpdate */ public function setUpdatedAtValue() { $this->setUpdatedAt(new \DateTime()); } /** * @ORM\Column(type="datetime", nullable=true) */ private $deleted_at; public function getDeletedAt(): ?\DateTimeInterface { return $this->deleted_at; } public function setDeletedAt(?\DateTimeInterface $deleted_at): self { $this->deleted_at = $deleted_at; return $this; } /** * @ORM\ManyToOne(targetEntity="App\Entity\Channel", inversedBy="categories") * * @ORM\JoinColumn(nullable=false) */ private $channel; public function getChannel(): ?Channel { return $this->channel; } public function setChannel(?Channel $channel): self { $this->channel = $channel; return $this; } /** * @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="channels") * * @ORM\JoinColumn(nullable=false) */ private $category; public function getCategory(): ?Category { return $this->category; } public function setCategory(?Category $category): self { $this->category = $category; return $this; }}