<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\InvoicesItemsRepository")
*/
class InvoicesItems
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="datetime")
*/
private $deadline;
/**
* @ORM\ManyToOne(targetEntity="Invoices", inversedBy="items")
* @ORM\JoinColumn(name="invoice", referencedColumnName="id", onDelete="SET NULL")
*/
private $invoice;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getDeadline(): ?\DateTimeInterface
{
return $this->deadline;
}
public function setDeadline(\DateTimeInterface $deadline): self
{
$this->deadline = $deadline;
return $this;
}
public function setInvoice($invoice)
{
$this->invoice = $invoice;
return $this;
}
public function getInvoice(): ?object
{
return $this->invoice;
}
}