src/Entity/Profile/ClientRestrictions.php line 14

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-03-19
  5.  * Time: 18:45
  6.  */
  7. namespace App\Entity\Profile;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. #[ORM\Embeddable]
  11. final class ClientRestrictions
  12. {
  13.     #[ORM\Column(name'client_min_age'type'smallint'nullabletrue)]
  14.     #[Groups(['preview''listing'])]
  15.     protected ?int $minAge;
  16.     #[ORM\Column(name'client_max_age'type'smallint'nullabletrue)]
  17.     #[Groups(['preview''listing'])]
  18.     protected ?int $maxAge;
  19.     public function __construct(?int $minAge, ?int $maxAge)
  20.     {
  21.         $this->minAge $minAge;
  22.         $this->maxAge $maxAge;
  23.     }
  24.     public function getMinAge(): ?int
  25.     {
  26.         return $this->minAge;
  27.     }
  28.     public function getMaxAge(): ?int
  29.     {
  30.         return $this->maxAge;
  31.     }
  32. }