src/Entity/OrderHistory.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\OrderHistoryRepository;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. #[ORM\Entity(repositoryClass: OrderHistoryRepository::class)]
  10. class OrderHistory
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id = null;
  16.     #[ORM\Column(type: Types::DATETIME_MUTABLE)]
  17.     #[Groups(['show_search'])]
  18.     private ?\DateTimeInterface $date_creation = null;
  19.     #[ORM\ManyToOne(inversedBy: 'update_by')]
  20.     private ?OrderFabrication $orderFabrication = null;
  21.     #[ORM\Column(type: Types::TEXT)]
  22.     #[Groups(['show_search'])]
  23.     private ?string $reason = null;
  24.     #[ORM\ManyToOne(inversedBy: 'orderHistories')]
  25.     #[ORM\JoinColumn(nullable: false)]
  26.     #[Groups(['show_search'])]
  27.     private ?User $user = null;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     
  33.     public function getDateCreation(): ?\DateTimeInterface
  34.     {
  35.         return $this->date_creation;
  36.     }
  37.     public function setDateCreation(\DateTimeInterface $date_creation): self
  38.     {
  39.         $this->date_creation = $date_creation;
  40.         return $this;
  41.     }
  42.     public function getOrderFabrication(): ?OrderFabrication
  43.     {
  44.         return $this->orderFabrication;
  45.     }
  46.     public function setOrderFabrication(?OrderFabrication $orderFabrication): self
  47.     {
  48.         $this->orderFabrication = $orderFabrication;
  49.         return $this;
  50.     }
  51.     public function getReason(): ?string
  52.     {
  53.         return $this->reason;
  54.     }
  55.     public function setReason(string $reason): self
  56.     {
  57.         $this->reason = $reason;
  58.         return $this;
  59.     }
  60.     public function getUser(): ?User
  61.     {
  62.         return $this->user;
  63.     }
  64.     public function setUser(?User $user): self
  65.     {
  66.         $this->user = $user;
  67.         return $this;
  68.     }
  69. }