src/Entity/Saloon/SaloonService.php line 12

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