src/Entity/Profile/ProfileService.php line 14

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