<?php
namespace App\Entity;
use App\Repository\PMessengerStatutRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PMessengerStatutRepository::class)]
class PMessengerStatut
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $classe = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $statut = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $message = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $created = null;
#[ORM\ManyToOne]
private ?Users $user = null;
#[ORM\OneToOne(mappedBy: 'messenger', cascade: ['persist', 'remove'])]
private ?PGenerationFichier $generationFichier = null;
public function __construct()
{
$this->created = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getClasse(): ?string
{
return $this->classe;
}
public function setClasse(?string $classe): static
{
$this->classe = $classe;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): static
{
$this->statut = $statut;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(?string $message): static
{
$this->message = $message;
return $this;
}
public function getCreated(): ?\DateTimeInterface
{
return $this->created;
}
public function setCreated(?\DateTimeInterface $created): static
{
$this->created = $created;
return $this;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): static
{
$this->user = $user;
return $this;
}
public function getGenerationFichier(): ?PGenerationFichier
{
return $this->generationFichier;
}
public function setGenerationFichier(?PGenerationFichier $generationFichier): static
{
// unset the owning side of the relation if necessary
if ($generationFichier === null && $this->generationFichier !== null) {
$this->generationFichier->setMessenger(null);
}
// set the owning side of the relation if necessary
if ($generationFichier !== null && $generationFichier->getMessenger() !== $this) {
$generationFichier->setMessenger($this);
}
$this->generationFichier = $generationFichier;
return $this;
}
}