src/Entity/CertificateTransaction.php line 9
<?php
namespace App\Entity;
use App\Repository\CertificateTransactionRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CertificateTransactionRepository::class)]
class CertificateTransaction
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?int $idCertificate = null;
#[ORM\Column]
private ?\DateTimeImmutable $datePaidAt = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $isCredit = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
public function __construct()
{
$this->setDatePaidAt(new \DateTimeImmutable('now', new \DateTimeZone('Europe/Paris')));
}
public function getId(): ?int
{
return $this->id;
}
public function getIdCertificate(): ?int
{
return $this->idCertificate;
}
public function setIdCertificate(?int $idCertificate): self
{
$this->idCertificate = $idCertificate;
return $this;
}
public function getDatePaidAt(): ?\DateTimeImmutable
{
return $this->datePaidAt;
}
public function setDatePaidAt(\DateTimeImmutable $datePaidAt): self
{
$this->datePaidAt = $datePaidAt;
return $this;
}
public function getIsCredit(): ?bool
{
return $this->isCredit;
}
public function setIsCredit(?bool $isCredit): self
{
$this->isCredit = $isCredit;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}