src/Entity/Payment.php line 11
<?phpnamespace App\Entity;use App\Repository\PaymentRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PaymentRepository::class)]#[ORM\HasLifecycleCallbacks]class Payment{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $paymentId = null;#[ORM\ManyToOne(inversedBy: 'payments', fetch:"EAGER")]#[ORM\JoinColumn(name:"payment_type_code", referencedColumnName: "payment_type_code", nullable: false)]private ?PaymentType $paymentType = null;#[ORM\ManyToOne(inversedBy: 'payments', fetch:"EAGER")]#[ORM\JoinColumn(name:"payment_status_code", referencedColumnName: "payment_status_code", nullable: false)]private ?PaymentStatus $paymentStatus = null;#[ORM\ManyToOne(inversedBy: 'payments')]#[ORM\JoinColumn(name:"user_id", referencedColumnName: "id", nullable: true)]private ?User $user = null;#[ORM\Column(length: 255, nullable: true)]private ?string $email = null;#[ORM\Column(length: 255, nullable: true)]private ?string $paymentIntentId = null;#[ORM\Column]private ?int $amount = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $updated = null;#[ORM\Column]private ?int $updatedBy = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $created = null;public function getPaymentId(): ?int{return $this->paymentId;}public function setPaymentId(int $paymentId): static{$this->paymentId = $paymentId;return $this;}public function getPaymentType(): ?PaymentType{return $this->paymentType;}public function setPaymentType(?PaymentType $paymentType): static{$this->paymentType = $paymentType;return $this;}public function getPaymentStatus(): ?PaymentStatus{return $this->paymentStatus;}public function setPaymentStatus(?PaymentStatus $paymentStatus): static{$this->paymentStatus = $paymentStatus;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): static{$this->email = $email;return $this;}public function getPaymentIntentId(): ?string{return $this->paymentIntentId;}public function setPaymentIntentId(?string $paymentIntentId): static{$this->paymentIntentId = $paymentIntentId;return $this;}public function getAmount(): ?int{return $this->amount;}public function setAmount(int $amount): static{$this->amount = $amount;return $this;}public function getUpdated(): ?\DateTimeInterface{return $this->updated;}#[ORM\PrePersist]#[ORM\PreUpdate]public function setUpdatedTimestamp(): void{$this->updated = new \DateTime();}// public function setUpdated(\DateTimeInterface $updated): static// {// $this->updated = $updated;//// return $this;// }public function getUpdatedBy(): ?int{return $this->updatedBy;}public function setUpdatedBy(int $updatedBy): static{$this->updatedBy = $updatedBy;return $this;}public function getCreated(): ?\DateTimeInterface{return $this->created;}#[ORM\PrePersist]#[ORM\PreUpdate]public function setCreatedTimestamp(): void{$this->created = new \DateTime();}public function setCreated(\DateTimeInterface $created): static{$this->created = $created;return $this;}}