WIP: Implement model
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Entity\Traits\BlameableEntity;
|
||||
use App\Entity\Traits\TimestampableEntity;
|
||||
use App\Repository\FeedbackRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FeedbackRepository::class)]
|
||||
class Feedback implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
{
|
||||
use BlameableEntity;
|
||||
use TimestampableEntity;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 36, unique: true)]
|
||||
private string $uuid;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'feedback')]
|
||||
private ?Teamer $teamer = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT)]
|
||||
private ?string $body = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $assignmentDestination = null;
|
||||
|
||||
#[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;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uuid = Uuid::v4();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUuid(): string
|
||||
{
|
||||
return $this->uuid;
|
||||
}
|
||||
|
||||
public function getTeamer(): ?Teamer
|
||||
{
|
||||
return $this->teamer;
|
||||
}
|
||||
|
||||
public function setTeamer(?Teamer $teamer): static
|
||||
{
|
||||
$this->teamer = $teamer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getBody(): ?string
|
||||
{
|
||||
return $this->body;
|
||||
}
|
||||
|
||||
public function setBody(string $body): static
|
||||
{
|
||||
$this->body = $body;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAssignmentDestination(): ?string
|
||||
{
|
||||
return $this->assignmentDestination;
|
||||
}
|
||||
|
||||
public function setAssignmentDestination(string $assignmentDestination): static
|
||||
{
|
||||
$this->assignmentDestination = $assignmentDestination;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAssignmentDate(): ?\DateTimeImmutable
|
||||
{
|
||||
return $this->assignmentDate;
|
||||
}
|
||||
|
||||
public function setAssignmentDate(\DateTimeImmutable $assignmentDate): static
|
||||
{
|
||||
$this->assignmentDate = $assignmentDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAuthorName(): ?string
|
||||
{
|
||||
return $this->authorName;
|
||||
}
|
||||
|
||||
public function setAuthorName(string $authorName): static
|
||||
{
|
||||
$this->authorName = $authorName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAuthorEmail(): ?string
|
||||
{
|
||||
return $this->authorEmail;
|
||||
}
|
||||
|
||||
public function setAuthorEmail(string $authorEmail): static
|
||||
{
|
||||
$this->authorEmail = $authorEmail;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user