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