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="string", length=20)
  18.      */
  19.     private $operator;
  20.     /**
  21.      * @ORM\Column(type="float")
  22.      */
  23.     private $amount;
  24.     /**
  25.      * @ORM\Column(type="string", length=20)
  26.      */
  27.     private $number;
  28.     /**
  29.      * @ORM\Column(type="string", length=20)
  30.      */
  31.     private $reason;
  32.     /**
  33.      * @ORM\Column(type="string", length=50)
  34.      */
  35.     private $operationType;
  36.     /**
  37.      * @ORM\Column(type="datetime")
  38.      */
  39.     private $dateCreated;
  40.     /**
  41.      * @ORM\Column(type="json", nullable=true)
  42.      */
  43.     private $apiResponse = [];
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity=Application::class, inversedBy="payments")
  46.      */
  47.     private $application;
  48.     /**
  49.      * @ORM\Column(type="text", nullable=true)
  50.      */
  51.     private $comment;
  52.     public function __construct()
  53.     {
  54.         date_default_timezone_set('Africa/Douala');
  55.         $this->dateCreated = new \Datetime(); //Default date
  56.     }
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getOperator(): ?string
  62.     {
  63.         return $this->operator;
  64.     }
  65.     public function setOperator(string $operator): self
  66.     {
  67.         $this->operator $operator;
  68.         return $this;
  69.     }
  70.     public function getAmount(): ?float
  71.     {
  72.         return $this->amount;
  73.     }
  74.     public function setAmount(float $amount): self
  75.     {
  76.         $this->amount $amount;
  77.         return $this;
  78.     }
  79.     public function getNumber(): ?string
  80.     {
  81.         return $this->number;
  82.     }
  83.     public function setNumber(string $number): self
  84.     {
  85.         $this->number $number;
  86.         return $this;
  87.     }
  88.     public function getReason(): ?string
  89.     {
  90.         return $this->reason;
  91.     }
  92.     public function setReason(string $reason): self
  93.     {
  94.         $this->reason $reason;
  95.         return $this;
  96.     }
  97.     public function getOperationType(): ?string
  98.     {
  99.         return $this->operationType;
  100.     }
  101.     public function setOperationType(string $operationType): self
  102.     {
  103.         $this->operationType $operationType;
  104.         return $this;
  105.     }
  106.     public function getDateCreated(): ?\DateTimeInterface
  107.     {
  108.         return $this->dateCreated;
  109.     }
  110.     public function setDateCreated(\DateTimeInterface $dateCreated): self
  111.     {
  112.         $this->dateCreated $dateCreated;
  113.         return $this;
  114.     }
  115.     public function getApiResponse(): ?array
  116.     {
  117.         return $this->apiResponse;
  118.     }
  119.     public function setApiResponse(?array $apiResponse): self
  120.     {
  121.         $this->apiResponse $apiResponse;
  122.         return $this;
  123.     }
  124.     public function getApplication(): ?Application
  125.     {
  126.         return $this->application;
  127.     }
  128.     public function setApplication(?Application $application): self
  129.     {
  130.         $this->application $application;
  131.         return $this;
  132.     }
  133.     public function getComment(): ?string
  134.     {
  135.         return $this->comment;
  136.     }
  137.     public function setComment(?string $comment): self
  138.     {
  139.         $this->comment $comment;
  140.         return $this;
  141.     }
  142. }