<?php
namespace App\Entity\Saloon;
use App\Entity\IProvidedService;
use App\Entity\Service;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'saloon_provided_services')]
#[ORM\Entity]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
class SaloonService implements IProvidedService
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
protected int $id;
#[ORM\JoinColumn(nullable: true)]
#[ORM\ManyToOne(targetEntity: Saloon::class)]
protected ?Saloon $saloon;
#[ORM\JoinColumn(nullable: false)]
#[ORM\ManyToOne(targetEntity: Service::class)]
protected Service $service;
#[ORM\Column(name: 'service_condition', type: 'integer', nullable: true)]
protected ?int $condition;
#[ORM\Column(type: 'integer', nullable: true)]
protected ?int $extraCharge;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
protected ?string $comment;
public function __construct(?Saloon $saloon, Service $service, ?int $condition, ?int $extraCharge, ?string $comment = null)
{
$this->saloon = $saloon;
$this->service = $service;
$this->condition = $condition;
$this->extraCharge = $extraCharge;
$this->comment = $comment;
}
public function getId(): int
{
return $this->id;
}
public function getSaloon(): Saloon
{
return $this->saloon;
}
public function setSaloon(?Saloon $saloon): void
{
$this->saloon = $saloon;
}
public function clearEntity(): void
{
$this->saloon = null;
}
public function getService(): Service
{
return $this->service;
}
public function setService(Service $service): void
{
$this->service = $service;
}
public function getCondition(): ?int
{
return $this->condition;
}
public function setCondition(?int $condition): void
{
$this->condition = $condition;
}
public function getExtraCharge(): ?int
{
return $this->extraCharge;
}
public function setExtraCharge(?int $extraCharge): void
{
$this->extraCharge = $extraCharge;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): void
{
$this->comment = $comment;
}
}