src/Entity/ProjectOrderBillingMetrics.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectOrderBillingMetricsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ProjectOrderBillingMetricsRepository::class)
  8.  */
  9. class ProjectOrderBillingMetrics
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({
  16.      *     "order_billing_metric@base",
  17.      *     "order_billing_metric@core"
  18.      * })
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\OneToOne(targetEntity=ProjectOrderBillings::class, inversedBy="billing_metrics", cascade={"persist", "remove"})
  23.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  24.      * @Groups({
  25.      *      "order_billing_metric@billing"
  26.      *  })
  27.      */
  28.     private $billing;
  29.     /**
  30.      * @ORM\Column(type="json", nullable=true)
  31.      * @Groups({
  32.      *      "order_billing_metric@core"
  33.      *  })
  34.      */
  35.     private $related_invoice_positions = [];
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getBilling(): ?ProjectOrderBillings
  41.     {
  42.         return $this->billing;
  43.     }
  44.     public function setBilling(ProjectOrderBillings $billing): self
  45.     {
  46.         $this->billing $billing;
  47.         return $this;
  48.     }
  49.     public function getRelatedInvoicePositions(): ?array
  50.     {
  51.         return $this->related_invoice_positions;
  52.     }
  53.     public function setRelatedInvoicePositions(?array $related_invoice_positions): self
  54.     {
  55.         $this->related_invoice_positions $related_invoice_positions;
  56.         return $this;
  57.     }
  58. }