src/Entity/Attendance.php line 12

Open in your IDE?
  1. <?php
  2. // src/Entity/Attendance.php
  3. namespace App\Entity;
  4. use App\Repository\AttendanceRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AttendanceRepository::class)
  8.  */
  9. class Attendance
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * Correction 2026 : Relation pointant vers l'entité Agent
  19.      * @ORM\ManyToOne(targetEntity=Agent::class, inversedBy="attendances")
  20.      * @ORM\JoinColumn(name="agent_id", referencedColumnName="id", nullable=false)
  21.      */
  22.     private $agent;
  23.     /**
  24.      * @ORM\Column(type="datetime")
  25.      */
  26.     private $timestamp;
  27.     /**
  28.      * @ORM\Column(type="string", length=10)
  29.      */
  30.     private $status;
  31.     /**
  32.      * @ORM\Column(type="boolean", options={"default": false})
  33.      */
  34.     private $isSynced false;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     /**
  40.      * Getters et Setters pour l'Agent
  41.      */
  42.     public function getAgent(): ?Agent
  43.     {
  44.         return $this->agent;
  45.     }
  46.     public function setAgent(?Agent $agent): self
  47.     {
  48.         $this->agent $agent;
  49.         return $this;
  50.     }
  51.     public function getTimestamp(): ?\DateTimeInterface
  52.     {
  53.         return $this->timestamp;
  54.     }
  55.     public function setTimestamp(\DateTimeInterface $timestamp): self
  56.     {
  57.         $this->timestamp $timestamp;
  58.         return $this;
  59.     }
  60.     public function getStatus(): ?string
  61.     {
  62.         return $this->status;
  63.     }
  64.     public function setStatus(string $status): self
  65.     {
  66.         $this->status $status;
  67.         return $this;
  68.     }
  69.     public function getIsSynced(): ?bool
  70.     {
  71.         return $this->isSynced;
  72.     }
  73.     public function setIsSynced(bool $isSynced): self
  74.     {
  75.         $this->isSynced $isSynced;
  76.         return $this;
  77.     }
  78. }