WIP: Implement feedback functionality
This commit is contained in:
+13
-27
@@ -26,8 +26,9 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
#[ORM\ManyToOne(inversedBy: 'feedback')]
|
||||
private ?Teamer $teamer = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT)]
|
||||
private ?string $body = null;
|
||||
#[ORM\ManyToOne(inversedBy: 'feedbacks')]
|
||||
#[ORM\JoinColumn(onDelete: 'SET NULL')]
|
||||
private ?Assignment $assignment = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $assignmentDestination = null;
|
||||
@@ -35,11 +36,8 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
|
||||
private ?\DateTimeImmutable $assignmentDate = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $authorName = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $authorEmail = null;
|
||||
#[ORM\Column]
|
||||
private array $ratings = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -68,14 +66,14 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getBody(): ?string
|
||||
public function getAssignment(): ?Assignment
|
||||
{
|
||||
return $this->body;
|
||||
return $this->assignment;
|
||||
}
|
||||
|
||||
public function setBody(string $body): static
|
||||
public function setAssignment(?Assignment $assignment): static
|
||||
{
|
||||
$this->body = $body;
|
||||
$this->assignment = $assignment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -104,26 +102,14 @@ class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAuthorName(): ?string
|
||||
public function getRatings(): array
|
||||
{
|
||||
return $this->authorName;
|
||||
return $this->ratings;
|
||||
}
|
||||
|
||||
public function setAuthorName(string $authorName): static
|
||||
public function setRatings(array $ratings): static
|
||||
{
|
||||
$this->authorName = $authorName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAuthorEmail(): ?string
|
||||
{
|
||||
return $this->authorEmail;
|
||||
}
|
||||
|
||||
public function setAuthorEmail(string $authorEmail): static
|
||||
{
|
||||
$this->authorEmail = $authorEmail;
|
||||
$this->ratings = $ratings;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user