<?php
namespace App\Entity;
use App\Repository\CampusArticleRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CampusArticleRepository::class)]
class CampusArticle
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'text')]
private ?string $title = null;
#[ORM\Column(type: 'text')]
private ?string $description = null;
#[ORM\OneToOne(targetEntity: Media::class, cascade: ['persist', 'remove'])]
private ?\App\Entity\Media $image = null;
#[ORM\ManyToOne(targetEntity: Campus::class, inversedBy: 'articles')]
#[ORM\JoinColumn(nullable: false)]
private ?\App\Entity\Campus $campus = null;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getImage(): ?Media
{
return $this->image;
}
public function setImage(?Media $image): self
{
$this->image = $image;
return $this;
}
public function getCampus(): ?Campus
{
return $this->campus;
}
public function setCampus(?Campus $campus): self
{
$this->campus = $campus;
return $this;
}
}