<?php
namespace App\Entity\Formation;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\Formation\AabsenceRepository;
use App\Traits\Actions;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AabsenceRepository::class)]
#[ORM\Table(name: 'hs_tc_formation_aabsence')]
#[ApiResource]
class Aabsence
{
use Actions;
#[ORM\ManyToOne(inversedBy: 'aabsences')]
#[ORM\JoinColumn(nullable: false)]
private ?Aseance $aseance = null;
#[ORM\ManyToOne(inversedBy: 'aabsences')]
#[ORM\JoinColumn(nullable: false)]
private ?Participant $participant = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reason = null;
public function __construct()
{
// date_default_timezone_set('Africa/Casablanca');
$this->createAt=new \DateTime('now');
$this->published=false;
}
public function getAseance(): ?Aseance
{
return $this->aseance;
}
public function setAseance(?Aseance $aseance): self
{
$this->aseance = $aseance;
return $this;
}
public function getParticipant(): ?Participant
{
return $this->participant;
}
public function setParticipant(?Participant $participant): self
{
$this->participant = $participant;
return $this;
}
public function getReason(): ?string
{
return $this->reason;
}
public function setReason(?string $reason): self
{
$this->reason = $reason;
return $this;
}
}