<?php
namespace App\Entity\Server\Ticket;
use App\Entity\BaseEntity;
use App\Entity\Generic\User;
use App\Repository\Server\Ticket\TicketMessageRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: TicketMessageRepository::class)]
class TicketMessage extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private $id;
#[ORM\ManyToOne(inversedBy: 'ticketMessages')]
#[ORM\JoinColumn(nullable: false)]
private ?Ticket $ticket = null;
#[ORM\Column(nullable: true)]
private ?array $files = null;
#[ORM\ManyToOne(inversedBy: 'ticketMessages')]
#[ORM\JoinColumn(nullable: false)]
private ?User $author = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $message = null;
public function getId(): ?string
{
return $this->id;
}
public function getTicket(): ?Ticket
{
return $this->ticket;
}
public function setTicket(?Ticket $ticket): static
{
$this->ticket = $ticket;
return $this;
}
public function getFiles(): ?array
{
return $this->files;
}
public function setFiles(?array $files): static
{
$this->files = $files;
return $this;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): static
{
$this->author = $author;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): static
{
$this->message = $message;
return $this;
}
}