<?php
namespace App\Entity\Core\Topic;
use App\Entity\User\User;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\ManyToOne;
#[ORM\Table('topic_performance')]
#[ORM\Entity(repositoryClass: TopicPerformanceRepository::class)]
class TopicPerformance
{
#[Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ManyToOne(targetEntity: User::class)]
private $student;
#[ManyToOne(targetEntity: Topic::class)]
private $topic;
#[Column(type: 'smallint', options: ['unsigned' => true])]
private $points;
public function __construct(User $student, Topic $topic, int $points)
{
$this->student = $student;
$this->topic = $topic;
$this->points = $points;
}
public function getPoints(): int
{
return $this->points;
}
public function setPoints(int $points): void
{
$this->points = $points;
}
public function getTopic(): Topic
{
return $this->topic;
}
}