src/Entity/Payment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaymentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=PaymentRepository::class)
  7.  */
  8. class Payment
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime_immutable")
  18.      */
  19.     private $createdAt;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $transactionID;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="payments")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $customer;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=BPModel::class)
  31.      * @ORM\JoinColumn(nullable=true)
  32.      */
  33.     private $bpModel;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Subscription::class, inversedBy="payments")
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $subscription;
  39.     /**
  40.      * @ORM\Column(type="boolean", nullable=true)
  41.      */
  42.     private $state;
  43.     /**
  44.      * @ORM\Column(type="array", nullable=true)
  45.      */
  46.     private $infos = [];
  47.     /**
  48.      * @ORM\Column(type="datetime_immutable", nullable=true)
  49.      */
  50.     private $updatedAt;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=Status::class, inversedBy="payments")
  53.      */
  54.     private $status;
  55.     public function __construct()
  56.     {
  57.         $this->createdAt = new \DateTimeImmutable();
  58.     }
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getCreatedAt(): ?\DateTimeImmutable
  64.     {
  65.         return $this->createdAt;
  66.     }
  67.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  68.     {
  69.         $this->createdAt $createdAt;
  70.         return $this;
  71.     }
  72.     public function getTransactionID(): ?string
  73.     {
  74.         return $this->transactionID;
  75.     }
  76.     public function setTransactionID(string $transactionID): self
  77.     {
  78.         $this->transactionID $transactionID;
  79.         return $this;
  80.     }
  81.     public function getCustomer(): ?User
  82.     {
  83.         return $this->customer;
  84.     }
  85.     public function setCustomer(?User $customer): self
  86.     {
  87.         $this->customer $customer;
  88.         return $this;
  89.     }
  90.     public function getBpModel(): ?BPModel
  91.     {
  92.         return $this->bpModel;
  93.     }
  94.     public function setBpModel(?BPModel $bpModel): self
  95.     {
  96.         $this->bpModel $bpModel;
  97.         return $this;
  98.     }
  99.     public function getSubscription(): ?Subscription
  100.     {
  101.         return $this->subscription;
  102.     }
  103.     public function setSubscription(?Subscription $subscription): self
  104.     {
  105.         $this->subscription $subscription;
  106.         return $this;
  107.     }
  108.     public function getState(): ?bool
  109.     {
  110.         return $this->state;
  111.     }
  112.     public function setState(?bool $state): self
  113.     {
  114.         $this->state $state;
  115.         return $this;
  116.     }
  117.     public function getInfos(): ?array
  118.     {
  119.         return $this->infos;
  120.     }
  121.     public function setInfos(?array $infos): self
  122.     {
  123.         $this->infos $infos;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt(): ?\DateTimeImmutable
  127.     {
  128.         return $this->updatedAt;
  129.     }
  130.     public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     public function getStatus(): ?Status
  136.     {
  137.         return $this->status;
  138.     }
  139.     public function setStatus(?Status $status): self
  140.     {
  141.         $this->status $status;
  142.         return $this;
  143.     }
  144. }