<?phpnamespace App\Entity;use App\Repository\UserTrackingDurationRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=UserTrackingDurationRepository::class) */class UserTrackingDuration{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\OneToOne(targetEntity=User::class, mappedBy="userTrackingDuration", cascade={"persist", "remove"}) */ private $user; /** * @ORM\Column(type="integer") */ private $averageDuration; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\Column(type="string", length=40, nullable=true) */ private $userRole; public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; // set (or unset) the owning side of the relation if necessary $newUserTrackingDuration = null === $user ? null : $this; if ($user->getUserTrackingDuration() !== $newUserTrackingDuration) { $user->setUserTrackingDuration($newUserTrackingDuration); } return $this; } /** * @return int|null : number of seconds */ public function getAverageDuration(): ?int { return $this->averageDuration; } /** * @param int $averageDuration : number of seconds * @return $this */ public function setAverageDuration(int $averageDuration): self { $this->averageDuration = $averageDuration; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getUserRole(): ?string { return $this->userRole; } public function setUserRole(?string $userRole): self { $this->userRole = $userRole; return $this; }}