src/Entity/Saloon/SaloonService.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Saloon;
  3. use App\Entity\IProvidedService;
  4. use App\Entity\Service;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Table(name'saloon_provided_services')]
  8. #[ORM\Entity]
  9. #[ORM\Cache(usage'NONSTRICT_READ_WRITE')]
  10. class SaloonService implements IProvidedService
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue(strategy'AUTO')]
  14.     #[ORM\Column(type'integer')]
  15.     protected int $id;
  16.     #[ORM\JoinColumn(nullabletrue)]
  17.     #[ORM\ManyToOne(targetEntitySaloon::class)]
  18.     protected ?Saloon $saloon;
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     #[ORM\ManyToOne(targetEntityService::class)]
  21.     #[Groups(['preview''listing'])]
  22.     protected Service $service;
  23.     #[ORM\Column(name'service_condition'type'integer'nullabletrue)]
  24.     #[Groups(['preview''listing'])]
  25.     protected ?int $condition;
  26.     #[ORM\Column(type'integer'nullabletrue)]
  27.     #[Groups(['preview''listing'])]
  28.     protected ?int $extraCharge;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     #[Groups(['preview''listing'])]
  31.     protected ?string $comment;
  32.     public function __construct(?Saloon $saloonService $service, ?int $condition, ?int $extraCharge, ?string $comment null)
  33.     {
  34.         $this->saloon $saloon;
  35.         $this->service $service;
  36.         $this->condition $condition;
  37.         $this->extraCharge $extraCharge;
  38.         $this->comment $comment;
  39.     }
  40.     public function getId(): int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getSaloon(): Saloon
  45.     {
  46.         return $this->saloon;
  47.     }
  48.     public function setSaloon(?Saloon $saloon): void
  49.     {
  50.         $this->saloon $saloon;
  51.     }
  52.     public function clearEntity(): void
  53.     {
  54.         $this->saloon null;
  55.     }
  56.     public function getService(): Service
  57.     {
  58.         return $this->service;
  59.     }
  60.     public function setService(Service $service): void
  61.     {
  62.         $this->service $service;
  63.     }
  64.     public function getCondition(): ?int
  65.     {
  66.         return $this->condition;
  67.     }
  68.     public function setCondition(?int $condition): void
  69.     {
  70.         $this->condition $condition;
  71.     }
  72.     public function getExtraCharge(): ?int
  73.     {
  74.         return $this->extraCharge;
  75.     }
  76.     public function setExtraCharge(?int $extraCharge): void
  77.     {
  78.         $this->extraCharge $extraCharge;
  79.     }
  80.     public function getComment(): ?string
  81.     {
  82.         return $this->comment;
  83.     }
  84.     public function setComment(?string $comment): void
  85.     {
  86.         $this->comment $comment;
  87.     }
  88. }