src/Entity/Payout.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JMS\Serializer\Annotation\Groups;
  5. /**
  6.  * @ORM\Table("Payout")
  7.  *
  8.  * @ORM\HasLifecycleCallbacks()
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\PayoutRepository")
  11.  */
  12. class Payout
  13. {
  14.     /**
  15.      * @Groups({"adminindex"})
  16.      *
  17.      * @ORM\Id()
  18.      *
  19.      * @ORM\GeneratedValue()
  20.      *
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @Groups({"adminindex"})
  26.      *
  27.      * @ORM\Column(type="date")
  28.      */
  29.     private $billing_month;
  30.     /**
  31.      * @Groups({"adminindex"})
  32.      *
  33.      * @ORM\Column(type="string", length=32)
  34.      */
  35.     private $area;
  36.     /**
  37.      * @Groups({"adminindex"})
  38.      *
  39.      * @ORM\Column(type="boolean")
  40.      */
  41.     private $is_sealed false;
  42.     /**
  43.      * @Groups({"adminindex"})
  44.      *
  45.      * @ORM\Column(type="datetime")
  46.      */
  47.     private $created_at;
  48.     /**
  49.      * @Groups({"payoutdetail"})
  50.      *
  51.      * @ORM\Column(type="datetime")
  52.      */
  53.     private $updated_at;
  54.     /**
  55.      * @Groups({"adminindex"})
  56.      *
  57.      * @var int
  58.      */
  59.     protected $transactions 0;
  60.     /**
  61.      * @Groups({"adminindex"})
  62.      *
  63.      * @var float
  64.      */
  65.     protected $sum 0;
  66.     /**
  67.      * @Groups({"adminindex"})
  68.      *
  69.      * @var float
  70.      */
  71.     protected $sumNet 0;
  72.     /**
  73.      * @ORM\PrePersist()
  74.      */
  75.     public function prePersist()
  76.     {
  77.         $now = new \DateTime();
  78.         $this->setCreatedAt($now);
  79.         $this->setUpdatedAt($now);
  80.     }
  81.     public function getId(): ?int
  82.     {
  83.         return $this->id;
  84.     }
  85.     public function getBillingMonth(): ?\DateTime
  86.     {
  87.         return $this->billing_month;
  88.     }
  89.     public function setBillingMonth(\DateTime $billing_month): self
  90.     {
  91.         $this->billing_month $billing_month;
  92.         return $this;
  93.     }
  94.     public function getArea(): ?string
  95.     {
  96.         return $this->area;
  97.     }
  98.     public function setArea(string $area): self
  99.     {
  100.         $this->area $area;
  101.         return $this;
  102.     }
  103.     public function getIsSealed(): ?bool
  104.     {
  105.         return $this->is_sealed;
  106.     }
  107.     public function setIsSealed(bool $is_sealed): self
  108.     {
  109.         $this->is_sealed $is_sealed;
  110.         return $this;
  111.     }
  112.     public function getCreatedAt(): ?\DateTimeInterface
  113.     {
  114.         return $this->created_at;
  115.     }
  116.     public function setCreatedAt(\DateTimeInterface $created_at): self
  117.     {
  118.         $this->created_at $created_at;
  119.         return $this;
  120.     }
  121.     public function getUpdatedAt(): ?\DateTimeInterface
  122.     {
  123.         return $this->updated_at;
  124.     }
  125.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  126.     {
  127.         $this->updated_at $updated_at;
  128.         return $this;
  129.     }
  130.     public function setTransactions(int $transactions): self
  131.     {
  132.         $this->transactions $transactions;
  133.         return $this;
  134.     }
  135.     public function getTransactions(): int
  136.     {
  137.         return $this->transactions;
  138.     }
  139.     public function getSum(): float
  140.     {
  141.         return $this->sum;
  142.     }
  143.     public function setSum(float $sum): self
  144.     {
  145.         $this->sum $sum;
  146.         return $this;
  147.     }
  148.     public function getSumNet(): float
  149.     {
  150.         return $this->sumNet;
  151.     }
  152.     public function setSumNet(float $sumNet): self
  153.     {
  154.         $this->sumNet $sumNet;
  155.         return $this;
  156.     }
  157. }