<?php
namespace App\Entity;
use App\Repository\ProjectOrderBillingMetricsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=ProjectOrderBillingMetricsRepository::class)
*/
class ProjectOrderBillingMetrics
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({
* "order_billing_metric@base",
* "order_billing_metric@core"
* })
*/
private $id;
/**
* @ORM\OneToOne(targetEntity=ProjectOrderBillings::class, inversedBy="billing_metrics", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
* @Groups({
* "order_billing_metric@billing"
* })
*/
private $billing;
/**
* @ORM\Column(type="json", nullable=true)
* @Groups({
* "order_billing_metric@core"
* })
*/
private $related_invoice_positions = [];
public function getId(): ?int
{
return $this->id;
}
public function getBilling(): ?ProjectOrderBillings
{
return $this->billing;
}
public function setBilling(ProjectOrderBillings $billing): self
{
$this->billing = $billing;
return $this;
}
public function getRelatedInvoicePositions(): ?array
{
return $this->related_invoice_positions;
}
public function setRelatedInvoicePositions(?array $related_invoice_positions): self
{
$this->related_invoice_positions = $related_invoice_positions;
return $this;
}
}