src/Entity/ExpressPricing.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. #[ORM\Embeddable]
  6. final class ExpressPricing
  7. {
  8.     #[ORM\Column(name'express_provided'type'boolean'nullabletrue)]
  9.     protected ?bool $provided;
  10.     #[ORM\Column(name'express_price'type'integer'nullabletrue)]
  11.     #[Groups(['preview''listing'])]
  12.     protected ?int $price;
  13.     public function __construct(?bool $provied, ?int $price)
  14.     {
  15.         $this->provided $provied;
  16.         $this->price $price;
  17.     }
  18.     #[Groups(['preview''listing'])]
  19.     public function isProvided(): ?bool
  20.     {
  21.         return $this->provided;
  22.     }
  23.     public function getPrice(): ?int
  24.     {
  25.         return $this->price;
  26.     }
  27. }