<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\OrderHistoryRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: OrderHistoryRepository::class)]
class OrderHistory
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
#[Groups(['show_search'])]
private ?\DateTimeInterface $date_creation = null;
#[ORM\ManyToOne(inversedBy: 'update_by')]
private ?OrderFabrication $orderFabrication = null;
#[ORM\Column(type: Types::TEXT)]
#[Groups(['show_search'])]
private ?string $reason = null;
#[ORM\ManyToOne(inversedBy: 'orderHistories')]
#[ORM\JoinColumn(nullable: false)]
#[Groups(['show_search'])]
private ?User $user = null;
public function getId(): ?int
{
return $this->id;
}
public function getDateCreation(): ?\DateTimeInterface
{
return $this->date_creation;
}
public function setDateCreation(\DateTimeInterface $date_creation): self
{
$this->date_creation = $date_creation;
return $this;
}
public function getOrderFabrication(): ?OrderFabrication
{
return $this->orderFabrication;
}
public function setOrderFabrication(?OrderFabrication $orderFabrication): self
{
$this->orderFabrication = $orderFabrication;
return $this;
}
public function getReason(): ?string
{
return $this->reason;
}
public function setReason(string $reason): self
{
$this->reason = $reason;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}