180 lines
3.2 KiB
PHP
180 lines
3.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\ExpenseReportRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use App\Core\Entity\EntityInterface;
|
|
|
|
/**
|
|
* @ORM\Entity(repositoryClass=ExpenseReportRepository::class)
|
|
*/
|
|
class ExpenseReport implements EntityInterface
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="expenseReports")
|
|
* @ORM\JoinColumn(nullable=false)
|
|
*/
|
|
private $user;
|
|
|
|
/**
|
|
* @ORM\Column(type="array")
|
|
*/
|
|
private $moves = [];
|
|
|
|
/**
|
|
* @ORM\Column(type="array")
|
|
*/
|
|
private $variousPayments = [];
|
|
|
|
/**
|
|
* @ORM\Column(type="boolean")
|
|
*/
|
|
private $isPaid;
|
|
|
|
/**
|
|
* @ORM\Column(type="datetime", nullable=true)
|
|
*/
|
|
private $paidAt;
|
|
|
|
/**
|
|
* @ORM\Column(type="array")
|
|
*/
|
|
private $bills = [];
|
|
|
|
/**
|
|
* @ORM\Column(type="date")
|
|
*/
|
|
private $dateFrom;
|
|
|
|
/**
|
|
* @ORM\Column(type="date")
|
|
*/
|
|
private $dateTo;
|
|
|
|
/**
|
|
* @ORM\Column(type="float")
|
|
*/
|
|
private $scalePerKilometer;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getUser(): ?User
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
public function setUser(?User $user): self
|
|
{
|
|
$this->user = $user;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMoves(): ?array
|
|
{
|
|
return $this->moves;
|
|
}
|
|
|
|
public function setMoves(array $moves): self
|
|
{
|
|
$this->moves = $moves;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getVariousPayments(): ?array
|
|
{
|
|
return $this->variousPayments;
|
|
}
|
|
|
|
public function setVariousPayments(array $variousPayments): self
|
|
{
|
|
$this->variousPayments = $variousPayments;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getIsPaid(): ?bool
|
|
{
|
|
return $this->isPaid;
|
|
}
|
|
|
|
public function setIsPaid(bool $isPaid): self
|
|
{
|
|
$this->isPaid = $isPaid;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPaidAt(): ?\DateTimeInterface
|
|
{
|
|
return $this->paidAt;
|
|
}
|
|
|
|
public function setPaidAt(?\DateTimeInterface $paidAt): self
|
|
{
|
|
$this->paidAt = $paidAt;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getBills(): ?array
|
|
{
|
|
return $this->bills;
|
|
}
|
|
|
|
public function setBills(array $bills): self
|
|
{
|
|
$this->bills = $bills;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDateFrom(): ?\DateTimeInterface
|
|
{
|
|
return $this->dateFrom;
|
|
}
|
|
|
|
public function setDateFrom(\DateTimeInterface $dateFrom): self
|
|
{
|
|
$this->dateFrom = $dateFrom;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDateTo(): ?\DateTimeInterface
|
|
{
|
|
return $this->dateTo;
|
|
}
|
|
|
|
public function setDateTo(\DateTimeInterface $dateTo): self
|
|
{
|
|
$this->dateTo = $dateTo;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScalePerKilometer(): ?float
|
|
{
|
|
return $this->scalePerKilometer;
|
|
}
|
|
|
|
public function setScalePerKilometer(float $scalePerKilometer): self
|
|
{
|
|
$this->scalePerKilometer = $scalePerKilometer;
|
|
|
|
return $this;
|
|
}
|
|
}
|