Files
myep-team/src/Entity/FeedbackSet.php
T

57 lines
1.2 KiB
PHP

<?php
namespace App\Entity;
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
{
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank(message: 'Bitte gib die Bezeichnung ein')]
private ?string $name = null;
#[ORM\Column]
#[Assert\Count(min: 1, minMessage: 'Bitte füge mindestens eine Bewertung hinzu')]
private array $items = [];
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getItems(): array
{
return $this->items;
}
public function setItems(array $items): static
{
$this->items = $items;
return $this;
}
}