<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: \App\Repository\PostCommentairesRepository::class)]
class PostCommentaires
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\ManyToOne(targetEntity: \App\Entity\Post::class, inversedBy: 'postCommentaires')]
private mixed $post;
#[ORM\Column(type: 'datetime', nullable: true)]
private mixed $date;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $auteur= null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $content= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $token= null;
#[ORM\Column(type: 'datetime', nullable: true)]
private mixed $date_comment;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $texte_email= null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $doit_valider;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $valide;
public function getId(): ?int
{
return $this->id;
}
public function getPost(): ?Post
{
return $this->post;
}
public function setPost(?Post $post): self
{
$this->post = $post;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getAuteur(): ?string
{
return $this->auteur;
}
public function setAuteur(?string $auteur): self
{
$this->auteur = $auteur;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
public function getDateComment(): ?\DateTimeInterface
{
return $this->date_comment;
}
public function setDateComment(?\DateTimeInterface $date_comment): self
{
$this->date_comment = $date_comment;
return $this;
}
public function getTexteEmail(): ?string
{
return $this->texte_email;
}
public function setTexteEmail(?string $texte_email): self
{
$this->texte_email = $texte_email;
return $this;
}
public function getDoitValider(): ?bool
{
return $this->doit_valider;
}
public function setDoitValider(?bool $doit_valider): self
{
$this->doit_valider = $doit_valider;
return $this;
}
public function getDoitValiderString(): string
{
if ($this->getDoitValider()) {
return "Oui";
} else {
return "Non";
}
}
public function getValide(): ?bool
{
return $this->valide;
}
public function setValide(?bool $valide): self
{
$this->valide = $valide;
return $this;
}
public function getValideString(): string
{
if ($this->getValide()) {
return "Oui";
} else {
return "Non";
}
}
}