src/Entity/MatchProfile.php line 33

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Controller\Api\AskForMatchProfileController;
  5. use App\Controller\Api\CheckMatchProfileController;
  6. use App\Repository\MatchProfileRepository;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. #[ORM\Entity(repositoryClassMatchProfileRepository::class)]
  11. /*#[ApiResource(
  12.     normalizationContext: ['groups' => ['profile']],
  13.     denormalizationContext: ['groups' => ['profile','post']],
  14.     collectionOperations: [
  15.         'get',
  16.         'post',
  17.         'askformatch'=> [
  18.             'method' => 'POST',
  19.             'path' => '/ask-for-match',
  20.             'controller' => AskForMatchProfileController::class,
  21.         ],
  22.        
  23.         
  24.     ],
  25.    
  26.    
  27.     
  28.     )]*/
  29. class MatchProfile
  30. {
  31.     #[ORM\Id]
  32.     #[ORM\GeneratedValue]
  33.     #[ORM\Column]
  34.     private ?int $id null;
  35.     #[ORM\Column(nullabletrue)]
  36.     #[Groups("profile")]
  37.     private ?bool $isMatchAccepted null;
  38.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  39.     #[Groups("profile")]
  40.     private ?\DateTimeInterface $askForMatchAt null;
  41.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  42.     #[Groups("profile")]
  43.     private ?\DateTimeInterface $ignoreMatchAt null;
  44.     
  45.     #[ORM\ManyToOne(inversedBy'askedMatches')]
  46.     #[Groups("post")]
  47.     private ?Profile $profileAskForMatch null;
  48.     #[ORM\ManyToOne(inversedBy'matchesByOthers')]
  49.     #[Groups("post")]
  50.     private ?Profile $profileMatched null;
  51.     #[ORM\Column(nullabletrue)]
  52.     #[Groups("profile")]
  53.     private ?bool $isIgnored null;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getIsMatchAccepted(): ?bool
  59.     {
  60.         return $this->isMatchAccepted;
  61.     }
  62.     public function setIsMatchAccepted(?bool $isMatchAccepted): self
  63.     {
  64.         $this->isMatchAccepted $isMatchAccepted;
  65.         return $this;
  66.     }
  67.     public function getAskForMatchAt(): ?\DateTimeInterface
  68.     {
  69.         return $this->askForMatchAt;
  70.     }
  71.     public function setAskForMatchAt(?\DateTimeInterface $askForMatchAt): self
  72.     {
  73.         $this->askForMatchAt $askForMatchAt;
  74.         return $this;
  75.     }
  76.     public function getIgnoreMatchAt(): ?\DateTimeInterface
  77.     {
  78.         return $this->ignoreMatchAt;
  79.     }
  80.     public function setIgnoreMatchAt(?\DateTimeInterface $ignoreMatchAt): self
  81.     {
  82.         $this->ignoreMatchAt $ignoreMatchAt;
  83.         return $this;
  84.     }
  85.     public function getProfileAskForMatch(): ?Profile
  86.     {
  87.         return $this->profileAskForMatch;
  88.     }
  89.     public function setProfileAskForMatch(?Profile $profileAskForMatch): self
  90.     {
  91.         $this->profileAskForMatch $profileAskForMatch;
  92.         return $this;
  93.     }
  94.     public function getProfileMatched(): ?Profile
  95.     {
  96.         return $this->profileMatched;
  97.     }
  98.     public function setProfileMatched(?Profile $profileMatched): self
  99.     {
  100.         $this->profileMatched $profileMatched;
  101.         return $this;
  102.     }
  103.     public function getIsIgnored(): ?bool
  104.     {
  105.         return $this->isIgnored;
  106.     }
  107.     public function setIsIgnored(?bool $isIgnored): self
  108.     {
  109.         $this->isIgnored $isIgnored;
  110.         return $this;
  111.     }
  112. }