<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
/**
* @ORM\Table("Payout")
*
* @ORM\HasLifecycleCallbacks()
*
* @ORM\Entity(repositoryClass="App\Repository\PayoutRepository")
*/
class Payout
{
/**
* @Groups({"adminindex"})
*
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Groups({"adminindex"})
*
* @ORM\Column(type="date")
*/
private $billing_month;
/**
* @Groups({"adminindex"})
*
* @ORM\Column(type="string", length=32)
*/
private $area;
/**
* @Groups({"adminindex"})
*
* @ORM\Column(type="boolean")
*/
private $is_sealed = false;
/**
* @Groups({"adminindex"})
*
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @Groups({"payoutdetail"})
*
* @ORM\Column(type="datetime")
*/
private $updated_at;
/**
* @Groups({"adminindex"})
*
* @var int
*/
protected $transactions = 0;
/**
* @Groups({"adminindex"})
*
* @var float
*/
protected $sum = 0;
/**
* @Groups({"adminindex"})
*
* @var float
*/
protected $sumNet = 0;
/**
* @ORM\PrePersist()
*/
public function prePersist()
{
$now = new \DateTime();
$this->setCreatedAt($now);
$this->setUpdatedAt($now);
}
public function getId(): ?int
{
return $this->id;
}
public function getBillingMonth(): ?\DateTime
{
return $this->billing_month;
}
public function setBillingMonth(\DateTime $billing_month): self
{
$this->billing_month = $billing_month;
return $this;
}
public function getArea(): ?string
{
return $this->area;
}
public function setArea(string $area): self
{
$this->area = $area;
return $this;
}
public function getIsSealed(): ?bool
{
return $this->is_sealed;
}
public function setIsSealed(bool $is_sealed): self
{
$this->is_sealed = $is_sealed;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeInterface $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function setTransactions(int $transactions): self
{
$this->transactions = $transactions;
return $this;
}
public function getTransactions(): int
{
return $this->transactions;
}
public function getSum(): float
{
return $this->sum;
}
public function setSum(float $sum): self
{
$this->sum = $sum;
return $this;
}
public function getSumNet(): float
{
return $this->sumNet;
}
public function setSumNet(float $sumNet): self
{
$this->sumNet = $sumNet;
return $this;
}
}