You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.2 KiB
68 lines
1.2 KiB
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\CommentaryRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: CommentaryRepository::class)]
|
|
class Commentary
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $text = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'commentaries')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?Post $post = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'commentaries')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?Profil $profil = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getText(): ?string
|
|
{
|
|
return $this->text;
|
|
}
|
|
|
|
public function setText(?string $text): static
|
|
{
|
|
$this->text = $text;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPost(): ?Post
|
|
{
|
|
return $this->post;
|
|
}
|
|
|
|
public function setPost(?Post $post): static
|
|
{
|
|
$this->post = $post;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getProfil(): ?Profil
|
|
{
|
|
return $this->profil;
|
|
}
|
|
|
|
public function setProfil(?Profil $profil): static
|
|
{
|
|
$this->profil = $profil;
|
|
|
|
return $this;
|
|
}
|
|
}
|