src/Entity/Payment.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'payment')]
  5. #[ORM\Entity(repositoryClass'App\Entity\Repository\PaymentRepository')]
  6. class Payment
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\Column(type'integer')]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(type'string'nullabletrue)]
  13.     private $type;
  14.     #[ORM\Column(type'string'nullabletrue)]
  15.     private $subscription_type;
  16.     #[ORM\Column(type'json'nullabletrue)]
  17.     private $transaction_data;
  18.     #[ORM\Column(type'datetime'nullabletrue)]
  19.     private $date_payment;
  20.     #[ORM\Column(type'datetime'nullabletrue)]
  21.     private $date_created;
  22.     #[ORM\Column(type'decimal'nullabletrueprecision6scale2)]
  23.     private $value;
  24.     #[ORM\Column(type'string'nullabletrue)]
  25.     private $status;
  26.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'payment')]
  27.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id'nullablefalse)]
  28.     private $user;
  29.     #[ORM\ManyToOne(targetEntity'App\Entity\Invoice'inversedBy'payment')]
  30.     #[ORM\JoinColumn(name'invoice_id'referencedColumnName'id')]
  31.     private $invoice;
  32.     #[ORM\Column(length50nullabletrue)]
  33.     private ?string $provider null;
  34.     #[ORM\Column(length5nullabletrue)]
  35.     private ?string $currency null;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getType(): ?string
  41.     {
  42.         return $this->type;
  43.     }
  44.     public function setType(?string $type): self
  45.     {
  46.         $this->type $type;
  47.         return $this;
  48.     }
  49.     public function getTransactionData()
  50.     {
  51.         return $this->transaction_data;
  52.     }
  53.     public function setTransactionData($transaction_data): self
  54.     {
  55.         $this->transaction_data $transaction_data;
  56.         return $this;
  57.     }
  58.     public function getDatePayment(): ?\DateTimeInterface
  59.     {
  60.         return $this->date_payment;
  61.     }
  62.     public function setDatePayment(?\DateTimeInterface $date_payment): self
  63.     {
  64.         $this->date_payment $date_payment;
  65.         return $this;
  66.     }
  67.     public function getDateCreated(): ?\DateTimeInterface
  68.     {
  69.         return $this->date_created;
  70.     }
  71.     public function setDateCreated(?\DateTimeInterface $date_created): self
  72.     {
  73.         $this->date_created $date_created;
  74.         return $this;
  75.     }
  76.     public function getUser(): ?User
  77.     {
  78.         return $this->user;
  79.     }
  80.     public function setUser(?User $user): self
  81.     {
  82.         $this->user $user;
  83.         return $this;
  84.     }
  85.     public function getInvoice(): ?Invoice
  86.     {
  87.         return $this->invoice;
  88.     }
  89.     public function setInvoice(?Invoice $invoice): self
  90.     {
  91.         $this->invoice $invoice;
  92.         return $this;
  93.     }
  94.     public function getValue()
  95.     {
  96.         return $this->value;
  97.     }
  98.     public function setValue($value): self
  99.     {
  100.         $this->value $value;
  101.         return $this;
  102.     }
  103.     public function getSubscriptionType(): ?string
  104.     {
  105.         return $this->subscription_type;
  106.     }
  107.     public function setSubscriptionType(?string $subscription_type): self
  108.     {
  109.         $this->subscription_type $subscription_type;
  110.         return $this;
  111.     }
  112.     public function getStatus(): ?string
  113.     {
  114.         return $this->status;
  115.     }
  116.     public function setStatus(?string $status): self
  117.     {
  118.         $this->status $status;
  119.         return $this;
  120.     }
  121.     public function getProvider(): ?string
  122.     {
  123.         return $this->provider;
  124.     }
  125.     public function setProvider(?string $provider): static
  126.     {
  127.         $this->provider $provider;
  128.         return $this;
  129.     }
  130.     public function getCurrency(): ?string
  131.     {
  132.         return $this->currency;
  133.     }
  134.     public function setCurrency(?string $currency): static
  135.     {
  136.         $this->currency $currency;
  137.         return $this;
  138.     }
  139. }