src/Entity/CompletedDialogue.php line 25

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\Get;
  4. use ApiPlatform\Metadata\Put;
  5. use ApiPlatform\Metadata\Post;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use ApiPlatform\Metadata\ApiProperty;
  8. use ApiPlatform\Metadata\ApiResource;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use ApiPlatform\Metadata\GetCollection;
  11. use App\Controller\CompletedController;
  12. use App\Controller\CompletedLastRuleController;
  13. use App\Repository\CompletedDialogueRepository;
  14. use Symfony\Component\Serializer\Annotation\Groups;
  15. use App\Controller\CreateCompletedDialogueController;
  16. use Symfony\Component\HttpFoundation\File\File;
  17. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  18. #[ORM\Entity(repositoryClassCompletedDialogueRepository::class)]
  19. #[Vich\Uploadable]
  20. class CompletedDialogue
  21. {
  22.     #[ORM\Id]
  23.     #[ORM\GeneratedValue]
  24.     #[ORM\Column]
  25.     private ?int $id null;
  26.     #[ORM\ManyToOne(inversedBy'completedDialogues')]
  27.     #[ORM\JoinColumn(nullablefalse)]
  28.     private ?Account $account null;
  29.     #[ORM\ManyToOne(inversedBy'completedDialogues')]
  30.     #[ORM\JoinColumn(nullablefalse)]
  31.     private ?Dialogue $dialogue null;
  32.     private ?string $photoUrl null;
  33.     #[Vich\UploadableField(mapping'completed_dialogue'fileNameProperty'photoPath')]
  34.     private ?File $file null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $photoPath null;
  37.     #[ORM\Column]
  38.     #[Gedmo\Timestampable(on"create")]
  39.     private ?\DateTimeImmutable $createdAt null;
  40.     #[ORM\Column(length255nullabletrue)]
  41.     private ?string $rule null;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getAccount(): ?Account
  47.     {
  48.         return $this->account;
  49.     }
  50.     public function setAccount(?Account $account): self
  51.     {
  52.         $this->account $account;
  53.         return $this;
  54.     }
  55.     public function getDialogue(): ?Dialogue
  56.     {
  57.         return $this->dialogue;
  58.     }
  59.     public function setDialogue(?Dialogue $dialogue): self
  60.     {
  61.         $this->dialogue $dialogue;
  62.         return $this;
  63.     }
  64.     public function getPhotoPath(): ?string
  65.     {
  66.         return $this->photoPath;
  67.     }
  68.     public function setPhotoPath(?string $photoPath): self
  69.     {
  70.         $this->photoPath $photoPath;
  71.         return $this;
  72.     }
  73.     public function getCreatedAt(): ?\DateTimeImmutable
  74.     {
  75.         return $this->createdAt;
  76.     }
  77.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  78.     {
  79.         $this->createdAt $createdAt;
  80.         return $this;
  81.     }
  82.     public function getRule(): ?string
  83.     {
  84.         return $this->rule;
  85.     }
  86.     public function setRule(?string $rule): self
  87.     {
  88.         $this->rule $rule;
  89.         return $this;
  90.     }
  91.     public function getPhotoUrl(): ?string
  92.     {
  93.         return $this->photoUrl;
  94.     }
  95.     public function setPhotoUrl(?string $photoUrl): self
  96.     {
  97.         $this->photoUrl $photoUrl;
  98.         return $this;
  99.     }
  100.     public function getFile(): ?File
  101.     {
  102.         return $this->file;
  103.     }
  104.     public function setFile(?File $file): self
  105.     {
  106.         $this->file $file;
  107.         return $this;
  108.     }
  109. }