src/Entity/Olympiad/Online/Participant/Result.php line 15
<?php
namespace App\Entity\Olympiad\Online\Participant;
use App\Entity\Common\File;
use App\Entity\Olympiad\Online\Participant;
use App\Entity\Traits\CreatedTrait;
use App\Entity\Traits\UpdatedTrait;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'olymp_online_participant_result')]
#[ORM\Entity(repositoryClass: 'App\Repository\Olympiad\Online\ResultRepository')]
#[ORM\HasLifecycleCallbacks]
class Result
{
use CreatedTrait;
use UpdatedTrait;
#[ORM\OneToOne(targetEntity: \App\Entity\Olympiad\Online\Participant::class)]
#[ORM\Id]
private Participant $participant;
#[ORM\Column(type: 'float', nullable: true)]
private ?float $score;
#[ORM\Column(type: 'boolean', options: ['default' => false])]
private bool $disqualified = false;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $disqualified_reason = null;
#[ORM\Column(type: 'boolean')]
private bool $moodle_result = false;
#[ORM\Column(type: Types::JSON, nullable: true)]
private ?array $detailed=null;
/**
* @var File|null
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Common\File')]
private ?File $certificate = null;
/**
* @return Participant
*/
public function getParticipant(): Participant
{
return $this->participant;
}
/**
* @param Participant $participant
*/
public function setParticipant(Participant $participant): void
{
$this->participant = $participant;
}
/**
* @return float
*/
public function getScore(): float
{
return $this->score;
}
/**
* @param float $score
*/
public function setScore(float $score): void
{
$this->score = $score;
}
/**
* @return bool
*/
public function isDisqualified(): bool
{
return $this->disqualified;
}
/**
* @param bool $disqualified
*/
public function setDisqualified(bool $disqualified): void
{
$this->disqualified = $disqualified;
}
/**
* @return string|null
*/
public function getDisqualifiedReason(): ?string
{
return $this->disqualified_reason;
}
/**
* @param string|null $disqualified_reason
*/
public function setDisqualifiedReason(?string $disqualified_reason): void
{
$this->disqualified_reason = $disqualified_reason;
}
/**
* @return File|null
*/
public function getCertificate(): ?File
{
return $this->certificate;
}
/**
* @param File|null $certificate
*/
public function setCertificate(?File $certificate): void
{
$this->certificate = $certificate;
}
/**
* @return bool
*/
public function isMoodleResult(): bool
{
return $this->moodle_result;
}
/**
* @param bool $moodle_result
*/
public function setMoodleResult(bool $moodle_result): void
{
$this->moodle_result = $moodle_result;
}
public function getDetailed(): ?array
{
return $this->detailed;
}
public function setDetailed(?array $detailed): void
{
$this->detailed = $detailed;
}
}