WIP: Implement feedback functionality

This commit is contained in:
Björn Fromme committed 2023-11-03 09:20:48 +01:00
1 parent d024e11f8f
commit d016ee043a
12 files changed
+123 -73

No files matched your search

+8 -6
View File
@@ -2,14 +2,16 @@
namespace App\Entity;
use App\Entity\Traits\BlameableEntity;
use App\Entity\Traits\TimestampableEntity;
use App\Repository\FeedbackSetRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: FeedbackSetRepository::class)]
class FeedbackSet implements TimestampableEntityInterface
class FeedbackSet implements BlameableEntityInterface, TimestampableEntityInterface
{
use BlameableEntity;
use TimestampableEntity;
#[ORM\Id]
@@ -23,7 +25,7 @@ class FeedbackSet implements TimestampableEntityInterface
#[ORM\Column]
#[Assert\Count(min: 1, minMessage: 'Bitte füge mindestens eine Bewertung hinzu')]
private array $items = [];
private array $ratings = [];
public function getId(): ?int
{
@@ -42,14 +44,14 @@ class FeedbackSet implements TimestampableEntityInterface
return $this;
}
public function getItems(): array
public function getRatings(): array
{
return $this->items;
return $this->ratings;
}
public function setItems(array $items): static
public function setRatings(array $ratings): static
{
$this->items = $items;
$this->ratings = $ratings;
return $this;
}