<?php
declare(strict_types=1);
namespace App\Entity\Core;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\User\User;
#[ORM\Table('bug_report')]
#[ORM\Entity(repositoryClass: BugReportRepository::class)]
class BugReport
{
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private int $id;
#[ORM\Column(name: 'session_id', type: 'integer', nullable: true)]
private ?int $sessionId;
#[ORM\JoinColumn(name: 'mp_id', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: Mathproblem::class, inversedBy: 'bugReports')]
private Mathproblem $problem;
#[ORM\Column(name: 'mp_error', type: 'boolean', options: ['default' => 0])]
private bool $mpError;
#[ORM\Column(name: 'mp_curriculum', type: 'boolean', options: ['default' => 0])]
private bool $mpCurriculum;
#[ORM\Column(name: 'mp_understanding', type: 'boolean', options: ['default' => 0])]
private bool $mpUnderstanding;
#[ORM\Column(name: 'mp_technical', type: 'boolean', options: ['default' => 0])]
private bool $mpTechnical;
/**
* @var string
*/
#[ORM\Column(name: 'message', type: 'string', nullable: true, length: 2000)]
private $message;
/**
* @var string
*/
#[ORM\Column(name: 'mp_name', type: 'string', nullable: true)]
private string $mpName;
#[ORM\Column(name: 'browser', type: 'string', nullable: true)]
private string $browser;
#[ORM\Column(name: 'timestamp', type: 'datetime', nullable: true)]
private DateTime $timestamp;
#[ORM\Column(name: 'is_teacher', type: 'boolean', nullable: true)]
private ?bool $isTeacher;
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: User::class)]
private User $user;
#[ORM\Column(type: 'datetime', nullable: true)]
private DateTime $dateResolved;
public function getId(): int
{
return $this->id;
}
public function getSessionId(): ?int
{
return $this->sessionId;
}
public function setSessionId(int $sessionId): void
{
$this->sessionId = $sessionId;
}
public function getProblem(): Mathproblem
{
return $this->problem;
}
public function setProblem(Mathproblem $problem): void
{
$this->problem = $problem;
}
public function isMpError(): bool
{
return $this->mpError;
}
public function setMpError(bool $mpError): void
{
$this->mpError = $mpError;
}
public function isMpCurriculum(): bool
{
return $this->mpCurriculum;
}
public function setMpCurriculum(bool $mpCurriculum): void
{
$this->mpCurriculum = $mpCurriculum;
}
public function isMpUnderstanding(): bool
{
return $this->mpUnderstanding;
}
public function setMpUnderstanding(bool $mpUnderstanding): void
{
$this->mpUnderstanding = $mpUnderstanding;
}
public function isMpTechnical(): bool
{
return $this->mpTechnical;
}
public function setMpTechnical(bool $mpTechnical): void
{
$this->mpTechnical = $mpTechnical;
}
public function getMessage(): string
{
return $this->message;
}
public function setMessage(string $message): void
{
$this->message = $message;
}
public function getMpName(): string
{
return $this->mpName;
}
public function setMpName($mpName): void
{
$this->mpName = $mpName;
}
public function isTeacher(): ?bool
{
return $this->isTeacher;
}
public function setIsTeacher($isTeacher): void
{
$this->isTeacher = $isTeacher;
}
public function getUser(): User
{
return $this->user;
}
public function setUser(User $user): void
{
$this->user = $user;
}
public function getBrowser(): string
{
return $this->browser;
}
public function setBrowser(string $browser): void
{
$this->browser = $browser;
}
public function getTimestamp(): DateTime
{
return $this->timestamp;
}
public function setTimestamp(DateTime $timestamp): void
{
$this->timestamp = $timestamp;
}
public function getDateResolved(): ?DateTime
{
return $this->dateResolved;
}
public function setDateResolved(DateTime $dateResolved): void
{
$this->dateResolved = $dateResolved;
}
public function getSnippet(): string
{
return $this->problem->getSnippet();
}
public function getTopic(): ?string
{
return $this->problem->getTemplate()->getTopic()->getName();
}
}