<?php
namespace App\Entity;
use App\Repository\TransferAmenityPriceRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: TransferAmenityPriceRepository::class)]
class TransferAmenityPrice
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'transferAmenityPrices')]
#[ORM\JoinColumn(nullable: false)]
private ?Transfer $transfer = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?TransferAmenity $amenity = null;
#[ORM\Column(nullable: true)]
#[Assert\NotBlank]
#[Assert\GreaterThan(0)]
private ?float $price = null;
public function getId(): ?int
{
return $this->id;
}
public function getTransfer(): ?Transfer
{
return $this->transfer;
}
public function setTransfer(?Transfer $transfer): static
{
$this->transfer = $transfer;
return $this;
}
public function getAmenity(): ?TransferAmenity
{
return $this->amenity;
}
public function setAmenity(?TransferAmenity $amenity): static
{
$this->amenity = $amenity;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(?float $price): static
{
$this->price = $price;
return $this;
}
}