<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\DeleteTrait;
use App\Repository\PriceRepository;
use App\Entity\Traits\SortOrderTrait;
use App\Entity\Traits\TranslateTrait;
use Gedmo\Mapping\Annotation as Gedmo;
use App\Entity\Interfaces\DefaultEntity;
use App\Entity\Traits\TitleAndContentTrait;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**
* @Gedmo\Loggable
*/
#[ORM\Entity(repositoryClass: \App\Repository\PriceRepository::class)]
#[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'price')]
class Price implements DefaultEntity
{
use TitleAndContentTrait;
use SortOrderTrait;
use ActiveTrait;
use DeleteTrait;
use TimestampableEntity;
use TranslateTrait;
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private readonly int $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $price;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $unit;
#[ORM\ManyToOne(targetEntity: ServiceCategory::class)]
#[ORM\JoinColumn(nullable: false)]
private $serviceCategory;
public function getId(): ?int
{
return $this->id;
}
public function getPrice(): ?string
{
return $this->price;
}
public function setPrice(?string $price): self
{
$this->price = $price;
return $this;
}
public function getUnit(): ?string
{
return $this->unit;
}
public function setUnit(?string $unit): self
{
$this->unit = $unit;
return $this;
}
public function getServiceCategory(): ?ServiceCategory
{
return $this->serviceCategory;
}
public function setServiceCategory(?ServiceCategory $serviceCategory): self
{
$this->serviceCategory = $serviceCategory;
return $this;
}
}