<?phpnamespace App\Entity;use App\Entity\Trait\isActif;use App\Repository\TicketRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=TicketRepository::class) * @ORM\HasLifecycleCallbacks() */class Ticket{ use isActif; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $subject; /** * @ORM\Column(type="string", length=255) */ private $typeOfRequest; /** * @ORM\Column(type="text") */ private $message; /** * @ORM\ManyToOne(targetEntity=Enterprise::class, inversedBy="tickets") */ private $enterprise; /** * @ORM\ManyToOne(targetEntity=Provider::class, inversedBy="tickets") */ private $provider; /** * @ORM\Column(type="datetime_immutable") */ private $date; /** * @ORM\ManyToOne(targetEntity=Contract::class, inversedBy="tickets") */ private $contract; /** * @ORM\Column(type="string", length=255, unique=true) */ private $slug; public function getId(): ?int { return $this->id; } public function getSubject(): ?string { return $this->subject; } public function setSubject(string $subject): self { $this->subject = $subject; return $this; } public function getTypeOfRequest(): ?string { return $this->typeOfRequest; } public function setTypeOfRequest(string $typeOfRequest): self { $this->typeOfRequest = $typeOfRequest; return $this; } public function getMessage(): ?string { return $this->message; } public function setMessage(string $message): self { $this->message = $message; return $this; } public function getEnterprise(): ?Enterprise { return $this->enterprise; } public function setEnterprise(?Enterprise $enterprise): self { $this->enterprise = $enterprise; return $this; } public function getProvider(): ?Provider { return $this->provider; } public function setProvider(?Provider $provider): self { $this->provider = $provider; return $this; } public function getDate(): ?\DateTimeImmutable { return $this->date; } public function setDate(\DateTimeImmutable $date): self { $this->date = $date; return $this; } public function getContract(): ?Contract { return $this->contract; } public function setContract(?Contract $contract): self { $this->contract = $contract; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(string $slug): self { $this->slug = $slug; return $this; } /** * @ORM\PrePersist */ public function setDateValue(): void { $this->date = new \DateTimeImmutable(); }}