<?php
namespace App\Entity;
use App\Repository\ProjectOrderUndertakingsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Doctrine\ORM\Mapping\UniqueConstraint;
/**
* @ORM\Entity(repositoryClass=ProjectOrderUndertakingsRepository::class)
* @ORM\Table(name="project_order_undertakings", uniqueConstraints={
* @UniqueConstraint(name="order_unique_invoice_nr", columns={"position_nr", "project_order_id"})
* })
*/
class ProjectOrderUndertakings
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({
* "project.order.undertaking.base",
*
* "project.details.orders",
* "order.detail",
*
*
* "vouchers.assigned.order.undertakings"
* })
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=ProjectOrders::class, inversedBy="project_order_undertakings")
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $project_order;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail",
*
*
* "vouchers.assigned.order.undertakings"
* })
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail",
*
*
* "vouchers.assigned.order.undertakings"
* })
*/
private $sent_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail",
*
*
* "vouchers.assigned.order.undertakings"
* })
*/
private $completed_at;
/**
* @ORM\Column(type="string", length=64, nullable=true, options={"comment":"Client undertaking via (Gutschrift) Position number"})
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail",
*
*
* "vouchers.assigned.order.undertakings"
* })
*/
private $position_nr;
/**
* @ORM\ManyToOne(targetEntity=Vouchers::class, inversedBy="project_order_undertakings")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail"
* })
*/
private $voucher;
/**
* @ORM\Column(type="float", precision=2, scale=2, nullable=true)
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "project.order.undertaking.base",
* "project.details.orders",
* "order.detail",
* "vouchers.assigned.order.undertakings"
* })
*/
private $price;
public function getId(): ?int
{
return $this->id;
}
public function getProjectOrder(): ?ProjectOrders
{
return $this->project_order;
}
public function setProjectOrder(?ProjectOrders $project_order): self
{
$this->project_order = $project_order;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getSentAt(): ?\DateTimeImmutable
{
return $this->sent_at;
}
public function setSentAt(?\DateTimeImmutable $sent_at): self
{
$this->sent_at = $sent_at;
return $this;
}
public function getCompletedAt(): ?\DateTimeImmutable
{
return $this->completed_at;
}
public function setCompletedAt(?\DateTimeImmutable $completed_at): self
{
$this->completed_at = $completed_at;
return $this;
}
public function getPositionNr(): ?string
{
return $this->position_nr;
}
public function setPositionNr(?string $position_nr): self
{
$this->position_nr = $position_nr;
return $this;
}
public function getVoucher(): ?Vouchers
{
return $this->voucher;
}
public function setVoucher(?Vouchers $voucher): self
{
$this->voucher = $voucher;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(?float $price): self
{
$this->price = $price;
return $this;
}
}