src/Entity/Ticket.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\TicketRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassTicketRepository::class)]
  8. #[ApiResource]
  9. class Ticket
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $subject null;
  17.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  18.     private ?string $description null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $createdAt null;
  21.     #[ORM\ManyToOne(inversedBy'tickets')]
  22.     private ?Profile $profile null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getSubject(): ?string
  28.     {
  29.         return $this->subject;
  30.     }
  31.     public function setSubject(?string $subject): static
  32.     {
  33.         $this->subject $subject;
  34.         return $this;
  35.     }
  36.     public function getDescription(): ?string
  37.     {
  38.         return $this->description;
  39.     }
  40.     public function setDescription(?string $description): static
  41.     {
  42.         $this->description $description;
  43.         return $this;
  44.     }
  45.     public function getCreatedAt(): ?\DateTimeInterface
  46.     {
  47.         return $this->createdAt;
  48.     }
  49.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  50.     {
  51.         $this->createdAt $createdAt;
  52.         return $this;
  53.     }
  54.     public function getProfile(): ?Profile
  55.     {
  56.         return $this->profile;
  57.     }
  58.     public function setProfile(?Profile $profile): static
  59.     {
  60.         $this->profile $profile;
  61.         return $this;
  62.     }
  63. }