<?php
namespace App\Entity;
use App\Repository\ProjectExpenseRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=ProjectExpenseRepository::class)
*/
class ProjectExpense
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"project.expenses"})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Projects::class, inversedBy="projectExpenses")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $project;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({"project.expenses"})
*/
private $status;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({"project.expenses"})
*/
private $receipt_nr;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({"project.expenses"})
*/
private $invoice_nr;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({"project.expenses"})
*/
private $receipt_at;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"project.expenses"})
*/
private $payment_status;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"project.expenses"})
*/
private $company_name;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({"project.expenses"})
*/
private $payment_method;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({"project.expenses"})
*/
private $due_at;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({"project.expenses"})
*/
private $total_amount;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({"project.expenses"})
*/
private $outstanding_balance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"project.expenses"})
*/
private $category;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"project.expenses"})
*/
private $open_transfer;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({"project.expenses"})
*/
private $paid_at;
public function getId(): ?int
{
return $this->id;
}
public function getProject(): ?Projects
{
return $this->project;
}
public function setProject(?Projects $project): self
{
$this->project = $project;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getReceiptNr(): ?string
{
return $this->receipt_nr;
}
public function setReceiptNr(string $receipt_nr): self
{
$this->receipt_nr = $receipt_nr;
return $this;
}
public function getInvoiceNr(): ?string
{
return $this->invoice_nr;
}
public function setInvoiceNr(string $invoice_nr): self
{
$this->invoice_nr = $invoice_nr;
return $this;
}
public function getReceiptAt(): ?\DateTimeImmutable
{
return $this->receipt_at;
}
public function setReceiptAt(?\DateTimeImmutable $receipt_at): self
{
$this->receipt_at = $receipt_at;
return $this;
}
public function getPaymentStatus(): ?string
{
return $this->payment_status;
}
public function setPaymentStatus(?string $payment_status): self
{
$this->payment_status = $payment_status;
return $this;
}
public function getCompanyName(): ?string
{
return $this->company_name;
}
public function setCompanyName(?string $company_name): self
{
$this->company_name = $company_name;
return $this;
}
public function getPaymentMethod(): ?string
{
return $this->payment_method;
}
public function setPaymentMethod(?string $payment_method): self
{
$this->payment_method = $payment_method;
return $this;
}
public function getDueAt(): ?\DateTimeImmutable
{
return $this->due_at;
}
public function setDueAt(?\DateTimeImmutable $due_at): self
{
$this->due_at = $due_at;
return $this;
}
public function getTotalAmount(): ?float
{
return $this->total_amount;
}
public function setTotalAmount(?float $total_amount): self
{
$this->total_amount = $total_amount;
return $this;
}
public function getOutstandingBalance(): ?float
{
return $this->outstanding_balance;
}
public function setOutstandingBalance(?float $outstanding_balance): self
{
$this->outstanding_balance = $outstanding_balance;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(?string $category): self
{
$this->category = $category;
return $this;
}
public function getOpenTransfer(): ?bool
{
return $this->open_transfer;
}
public function setOpenTransfer(?bool $open_transfer): self
{
$this->open_transfer = $open_transfer;
return $this;
}
public function getPaidAt(): ?\DateTimeImmutable
{
return $this->paid_at;
}
public function setPaidAt(\DateTimeImmutable $paid_at): self
{
$this->paid_at = $paid_at;
return $this;
}
}