<?php
namespace App\Entity;
use App\Repository\ProfileQcmRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProfileQcmRepository::class)]
class ProfileQcm
{
const TODO = 1;
const IN_PROGRESS = 2;
const DONE = 3;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Profile::class, inversedBy: 'profileQcms')]
private ?\App\Entity\Profile $profile = null;
#[ORM\ManyToOne(targetEntity: Qcm::class, inversedBy: 'profileQcms')]
private ?\App\Entity\Qcm $qcm = null;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $data = [];
#[ORM\Column(type: 'float', nullable: true)]
private ?float $point = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTimeInterface $startAt = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTimeInterface $endAt = null;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $remaining = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTimeInterface $lastPing = null;
public function getId(): ?int
{
return $this->id;
}
public function getProfile(): ?Profile
{
return $this->profile;
}
public function setProfile(?Profile $profile): self
{
$this->profile = $profile;
return $this;
}
public function getQcm(): ?Qcm
{
return $this->qcm;
}
public function setQcm(?Qcm $qcm): self
{
$this->qcm = $qcm;
return $this;
}
public function getData(): ?array
{
return $this->data;
}
public function setData(?array $data): self
{
$this->data = $data;
return $this;
}
public function getPoint(): ?float
{
return $this->point;
}
public function setPoint(?float $point): self
{
$this->point = $point;
return $this;
}
public function getStartAt(): ?\DateTimeInterface
{
return $this->startAt;
}
public function setStartAt(?\DateTimeInterface $startAt): self
{
$this->startAt = $startAt;
return $this;
}
public function getEndAt(): ?\DateTimeInterface
{
return $this->endAt;
}
public function setEndAt(?\DateTimeInterface $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function getRemaining(): ?int
{
return $this->remaining;
}
public function setRemaining(?int $remaining): self
{
$this->remaining = $remaining;
return $this;
}
public function getLastPing(): ?\DateTimeInterface
{
return $this->lastPing;
}
public function setLastPing(\DateTimeInterface $lastPing): self
{
$this->lastPing = $lastPing;
return $this;
}
}