src/Entity/SubscriptionPayment.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SubscriptionPaymentRepository;
  4. use App\Traits\TimeStampTrait;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassSubscriptionPaymentRepository::class)]
  8. #[ORM\HasLifecycleCallbacks]
  9. class SubscriptionPayment
  10. {
  11.     use TimeStampTrait;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(inversedBy'subscriptionPayments')]
  17.     private ?Subscription $subscription null;
  18.     #[ORM\ManyToOne]
  19.     private ?Entreprise $entreprise null;
  20.     #[ORM\ManyToOne]
  21.     private ?Package $package null;
  22.     #[ORM\Column(length100uniquetrue)]
  23.     private ?string $orderNumber null;
  24.     #[ORM\Column(typeTypes::DECIMALprecision10scale2)]
  25.     private ?string $amount null;
  26.     #[ORM\Column(length10)]
  27.     private ?string $currency null;
  28.     #[ORM\Column(length20)]
  29.     private ?string $billingCycle null;
  30.     #[ORM\Column]
  31.     private int $monthsCount 1;
  32.     #[ORM\Column(length25)]
  33.     private ?string $status null;
  34.     #[ORM\Column(nullabletrue)]
  35.     private ?bool $paid null;
  36.     #[ORM\Column(length150nullabletrue)]
  37.     private ?string $gatewayReference null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $checkoutUrl null;
  40.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  41.     private ?string $gatewayPayload null;
  42.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  43.     private ?\DateTimeInterface $paidAt null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getSubscription(): ?Subscription
  49.     {
  50.         return $this->subscription;
  51.     }
  52.     public function setSubscription(?Subscription $subscription): static
  53.     {
  54.         $this->subscription $subscription;
  55.         return $this;
  56.     }
  57.     public function getEntreprise(): ?Entreprise
  58.     {
  59.         return $this->entreprise;
  60.     }
  61.     public function setEntreprise(?Entreprise $entreprise): static
  62.     {
  63.         $this->entreprise $entreprise;
  64.         return $this;
  65.     }
  66.     public function getPackage(): ?Package
  67.     {
  68.         return $this->package;
  69.     }
  70.     public function setPackage(?Package $package): static
  71.     {
  72.         $this->package $package;
  73.         return $this;
  74.     }
  75.     public function getOrderNumber(): ?string
  76.     {
  77.         return $this->orderNumber;
  78.     }
  79.     public function setOrderNumber(string $orderNumber): static
  80.     {
  81.         $this->orderNumber $orderNumber;
  82.         return $this;
  83.     }
  84.     public function getAmount(): ?string
  85.     {
  86.         return $this->amount;
  87.     }
  88.     public function setAmount(string $amount): static
  89.     {
  90.         $this->amount $amount;
  91.         return $this;
  92.     }
  93.     public function getCurrency(): ?string
  94.     {
  95.         return $this->currency;
  96.     }
  97.     public function setCurrency(string $currency): static
  98.     {
  99.         $this->currency $currency;
  100.         return $this;
  101.     }
  102.     public function getBillingCycle(): ?string
  103.     {
  104.         return $this->billingCycle;
  105.     }
  106.     public function setBillingCycle(string $billingCycle): static
  107.     {
  108.         $this->billingCycle $billingCycle;
  109.         return $this;
  110.     }
  111.     public function getMonthsCount(): int
  112.     {
  113.         return $this->monthsCount;
  114.     }
  115.     public function setMonthsCount(int $monthsCount): static
  116.     {
  117.         $this->monthsCount max(1$monthsCount);
  118.         return $this;
  119.     }
  120.     public function getStatus(): ?string
  121.     {
  122.         return $this->status;
  123.     }
  124.     public function setStatus(string $status): static
  125.     {
  126.         $this->status $status;
  127.         return $this;
  128.     }
  129.     public function isPaid(): ?bool
  130.     {
  131.         return $this->paid;
  132.     }
  133.     public function setPaid(?bool $paid): static
  134.     {
  135.         $this->paid $paid;
  136.         return $this;
  137.     }
  138.     public function getGatewayReference(): ?string
  139.     {
  140.         return $this->gatewayReference;
  141.     }
  142.     public function setGatewayReference(?string $gatewayReference): static
  143.     {
  144.         $this->gatewayReference $gatewayReference;
  145.         return $this;
  146.     }
  147.     public function getCheckoutUrl(): ?string
  148.     {
  149.         return $this->checkoutUrl;
  150.     }
  151.     public function setCheckoutUrl(?string $checkoutUrl): static
  152.     {
  153.         $this->checkoutUrl $checkoutUrl;
  154.         return $this;
  155.     }
  156.     public function getGatewayPayload(): ?string
  157.     {
  158.         return $this->gatewayPayload;
  159.     }
  160.     public function setGatewayPayload(?string $gatewayPayload): static
  161.     {
  162.         $this->gatewayPayload $gatewayPayload;
  163.         return $this;
  164.     }
  165.     public function getPaidAt(): ?\DateTimeInterface
  166.     {
  167.         return $this->paidAt;
  168.     }
  169.     public function setPaidAt(?\DateTimeInterface $paidAt): static
  170.     {
  171.         $this->paidAt $paidAt;
  172.         return $this;
  173.     }
  174. }