<?php
declare(strict_types=1);
namespace App\Entity\Logs;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="stripe_notification")
*
* @ORM\Entity(repositoryClass="App\Repository\Logs\StripeNotificationRepository")
*/
class StripeNotification
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer", name="id")
*/
private ?int $id = null;
/**
* @ORM\Column(type="integer", name="order_id")
*/
private ?int $order = null;
/**
* @ORM\Column(type="integer", name="customer_id")
*/
private ?int $customer = null;
/**
* @ORM\Column(type="string", name="checkout_session_reference", nullable=true)
*/
private ?string $checkoutSession = null;
/**
* @ORM\Column(type="string", name="event_code")
*/
private string $eventCode;
/**
* @ORM\Column(type="boolean", name="paid")
*/
private bool $paid;
/**
* @ORM\Column(type="string", name="subscription")
*/
private ?string $subscription = null;
/**
* @ORM\Column(type="text", nullable=true, name="error_message")
*/
private ?string $errorMessage = null;
/**
* @ORM\Column(type="integer", name="attempts", nullable=true)
*/
private ?int $attempts = null;
/**
* @ORM\Column(name="next_payment_attempt", type="datetime", nullable=true)
*/
private ?\DateTime $nextPaymentAttempt = null;
/**
* @ORM\Column(type="text", name="message")
*/
private string $message;
/**
* @ORM\Column(name="date_add", type="datetime")
*/
private \DateTime $dateAdd;
public function __construct()
{
$this->dateAdd = new \DateTime();
}
public function getId(): int
{
return $this->id;
}
public function getOrder(): ?int
{
return $this->order;
}
public function setOrder(?int $order): StripeNotification
{
$this->order = $order;
return $this;
}
public function getCustomer(): ?int
{
return $this->customer;
}
public function setCustomer(?int $customer): StripeNotification
{
$this->customer = $customer;
return $this;
}
public function getCheckoutSession(): ?string
{
return $this->checkoutSession;
}
public function setCheckoutSession(?string $checkoutSession): StripeNotification
{
$this->checkoutSession = $checkoutSession;
return $this;
}
public function getEventCode(): string
{
return $this->eventCode;
}
public function setEventCode(string $eventCode): StripeNotification
{
$this->eventCode = $eventCode;
return $this;
}
public function isPaid(): bool
{
return $this->paid;
}
public function setPaid(bool $paid): StripeNotification
{
$this->paid = $paid;
return $this;
}
public function getMessage(): string
{
return $this->message;
}
public function setMessage(string $message): StripeNotification
{
$this->message = $message;
return $this;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function getSubscription(): ?string
{
return $this->subscription;
}
public function setSubscription(?string $subscription): StripeNotification
{
$this->subscription = $subscription;
return $this;
}
public function getErrorMessage(): ?string
{
return $this->errorMessage;
}
public function setErrorMessage(string $errorMessage): StripeNotification
{
$this->errorMessage = $errorMessage;
return $this;
}
public function getAttempts(): ?int
{
return $this->attempts;
}
public function setAttempts(?int $attempts): StripeNotification
{
$this->attempts = $attempts;
return $this;
}
public function getNextPaymentAttempt(): ?\DateTime
{
return $this->nextPaymentAttempt;
}
public function setNextPaymentAttempt(?\DateTime $nextPaymentAttempt): StripeNotification
{
$this->nextPaymentAttempt = $nextPaymentAttempt;
return $this;
}
}