src/Entity/Formation/Aabsence.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Formation;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\Formation\AabsenceRepository;
  5. use App\Traits\Actions;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassAabsenceRepository::class)]
  9. #[ORM\Table(name'hs_tc_formation_aabsence')]
  10. #[ApiResource]
  11. class Aabsence
  12. {
  13.     use Actions;
  14.     #[ORM\ManyToOne(inversedBy'aabsences')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?Aseance $aseance null;
  17.     #[ORM\ManyToOne(inversedBy'aabsences')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Participant $participant null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $reason null;
  22.     public function __construct()
  23.     {
  24.         // date_default_timezone_set('Africa/Casablanca');
  25.         $this->createAt=new \DateTime('now');
  26.         $this->published=false;
  27.     }
  28.     public function getAseance(): ?Aseance
  29.     {
  30.         return $this->aseance;
  31.     }
  32.     public function setAseance(?Aseance $aseance): self
  33.     {
  34.         $this->aseance $aseance;
  35.         return $this;
  36.     }
  37.     public function getParticipant(): ?Participant
  38.     {
  39.         return $this->participant;
  40.     }
  41.     public function setParticipant(?Participant $participant): self
  42.     {
  43.         $this->participant $participant;
  44.         return $this;
  45.     }
  46.     public function getReason(): ?string
  47.     {
  48.         return $this->reason;
  49.     }
  50.     public function setReason(?string $reason): self
  51.     {
  52.         $this->reason $reason;
  53.         return $this;
  54.     }
  55. }