src/Flexy/ShopBundle/Entity/Payment/Payment.php line 12
<?php
namespace App\Flexy\ShopBundle\Entity\Payment;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Flexy\ShopBundle\Entity\Shipping\Vehicle\VehicleRent;
use App\Flexy\ShopBundle\Repository\Payment\PaymentRepository;
use Doctrine\ORM\Mapping as ORM;
#[ApiResource]
#[ORM\Entity(repositoryClass: PaymentRepository::class)]
class Payment
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(type: 'float')]
private ?float $amount = null;
#[ORM\Column(type: 'string', length: 255)]
private ?string $state = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description = null;
#[ORM\ManyToOne(targetEntity: PaymentMethod::class, inversedBy: 'payments')]
#[ORM\JoinColumn(nullable: false)]
private ?\App\Flexy\ShopBundle\Entity\Payment\PaymentMethod $paymentMethod = null;
#[ORM\ManyToOne(inversedBy: 'payments')]
private ?VehicleRent $vehicleRent = null;
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getAmount(): ?float
{
return $this->amount;
}
public function setAmount(float $amount): self
{
$this->amount = $amount;
return $this;
}
public function getState(): ?string
{
return $this->state;
}
public function setState(string $state): self
{
$this->state = $state;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getPaymentMethod(): ?PaymentMethod
{
return $this->paymentMethod;
}
public function setPaymentMethod(?PaymentMethod $paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
public function getVehicleRent(): ?VehicleRent
{
return $this->vehicleRent;
}
public function setVehicleRent(?VehicleRent $vehicleRent): self
{
$this->vehicleRent = $vehicleRent;
return $this;
}
}