add ticket purchase page
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me> Reviewed-on: http://git.simonis.lol/projects/abiball/pulls/13 Reviewed-by: jank1619 <jan@kjan.email>
This commit is contained in:
66
src/Entity/Payment.php
Normal file
66
src/Entity/Payment.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\PaymentRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: PaymentRepository::class)]
|
||||
class Payment
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $sessionId = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $completed = null;
|
||||
|
||||
#[ORM\OneToOne(inversedBy: 'payment', cascade: ['persist', 'remove'], fetch: 'EAGER')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Customer $customer = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getSessionId(): ?string
|
||||
{
|
||||
return $this->sessionId;
|
||||
}
|
||||
|
||||
public function setSessionId(string $sessionId): static
|
||||
{
|
||||
$this->sessionId = $sessionId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isCompleted(): ?bool
|
||||
{
|
||||
return $this->completed;
|
||||
}
|
||||
|
||||
public function setCompleted(bool $completed): static
|
||||
{
|
||||
$this->completed = $completed;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCustomer(): ?Customer
|
||||
{
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
public function setCustomer(Customer $customer): static
|
||||
{
|
||||
$this->customer = $customer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user