vendor/bluue/sales-bundle/src/Entity/OrderHistory.php line 26

Open in your IDE?
  1. <?php
  2. /**
  3.  * @author Quentin CHATELAIN (contact@scaledev.fr)
  4.  * @copyright 2021 - ScaleDEV SAS, 12 RUE CHARLES MORET, 10120 ST ANDRE LES VERGERS
  5.  * @license commercial
  6.  */
  7. declare(strict_types=1);
  8. namespace Bluue\SalesBundle\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Uid\Uuid;
  11. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  12. use Bluue\SalesBundle\Repository\OrderHistoryRepository;
  13. use App\DoctrineExtensions\Timestampable\Traits\UserTimestampableEntity;
  14. /**
  15.  * @ORM\Entity(repositoryClass=OrderHistoryRepository::class)
  16.  * @ORM\Table(name="sales_bundle__order_history", indexes={
  17.  *  @ORM\Index(name="created_at", columns={"created_at"}),
  18.  *  @ORM\Index(name="updated_at", columns={"updated_at"})
  19.  * })
  20.  */
  21. class OrderHistory
  22. {
  23.     use UserTimestampableEntity;
  24.     /**
  25.      * @ORM\Id
  26.      * @ORM\Column(type="uuid")
  27.      * @ORM\GeneratedValue(strategy="CUSTOM")
  28.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  29.      */
  30.     private ?Uuid $id null;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Order::class, inversedBy="histories")
  33.      */
  34.     private ?Order $order null;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=OrderState::class)
  37.      */
  38.     private ?OrderState $order_state null;
  39.     /**
  40.      * @return Uuid|null
  41.      */
  42.     public function getId(): ?Uuid
  43.     {
  44.         return $this->id;
  45.     }
  46.     /**
  47.      * @return Order|null
  48.      */
  49.     public function getOrder(): ?Order
  50.     {
  51.         return $this->order;
  52.     }
  53.     /**
  54.      * @param Order|null $order
  55.      * @return OrderHistory
  56.      */
  57.     public function setOrder(?Order $order): self
  58.     {
  59.         $this->order $order;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return OrderState|null
  64.      */
  65.     public function getOrderState(): ?OrderState
  66.     {
  67.         return $this->order_state;
  68.     }
  69.     /**
  70.      * @param OrderState|null $order_state
  71.      * @return OrderHistory
  72.      */
  73.     public function setOrderState(?OrderState $order_state): self
  74.     {
  75.         $this->order_state $order_state;
  76.         return $this;
  77.     }
  78. }