src/Entity/PackServiceItem.php line 11
<?php
namespace App\Entity;
use App\Repository\PackServiceItemRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
#[ORM\Entity(repositoryClass: PackServiceItemRepository::class)]
#[ORM\Table(name: '`pack_service_items`')]
class PackServiceItem
{
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?float $price = null;
#[ORM\Column]
private ?int $quantity = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?ServiceItem $serviceItem = null;
#[ORM\ManyToOne(inversedBy: 'packServiceItems')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?Pack $pack = null;
public function getId(): ?int
{
return $this->id;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(float $price): self
{
$this->price = $price;
return $this;
}
public function getQuantity(): ?int
{
return $this->quantity;
}
public function setQuantity(int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getServiceItem(): ?ServiceItem
{
return $this->serviceItem;
}
public function setServiceItem(?ServiceItem $serviceItem): self
{
$this->serviceItem = $serviceItem;
return $this;
}
public function getPack(): ?Pack
{
return $this->pack;
}
public function setPack(?Pack $pack): self
{
$this->pack = $pack;
return $this;
}
}