<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\EmailSessionRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EmailSessionRepository::class)]
#[ApiResource]
class EmailSession
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $object = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $piece = null;
#[ORM\ManyToOne(inversedBy: 'emailSessions')]
private ?Evenement $session = null;
public function getId(): ?int
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getObject(): ?string
{
return $this->object;
}
public function setObject(?string $object): self
{
$this->object = $object;
return $this;
}
public function getPiece(): ?string
{
return $this->piece;
}
public function setPiece(?string $piece): self
{
$this->piece = $piece;
return $this;
}
public function getSession(): ?Evenement
{
return $this->session;
}
public function setSession(?Evenement $session): self
{
$this->session = $session;
return $this;
}
}