src/Entity/Catalog/Expedition.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Catalog;
  3. use App\Repository\Catalog\ExpeditionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Timestampable\Traits\TimestampableEntity;
  6. use Ramsey\Uuid\Doctrine\UuidGenerator;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Symfony\Component\Serializer\Annotation\SerializedName;
  9. /**
  10.  * @ORM\Entity(repositoryClass=ExpeditionRepository::class)
  11.  */
  12. class Expedition
  13. {
  14.     /**
  15.      * Hook timestampable behavior
  16.      * updates createdAt, updatedAt fields
  17.      */
  18.     use TimestampableEntity;
  19.     /**
  20.      * @ORM\Id
  21.      * @ORM\Column(type="uuid", unique=true)
  22.      * @ORM\GeneratedValue(strategy="CUSTOM")
  23.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  24.      */
  25.     private string $id;
  26.     /**
  27.      * @var string
  28.      * @ORM\Column(type="string")
  29.      * @SerializedName("shannon_order_id")
  30.      * @Groups({
  31.      *     "get_order_by_user",
  32.      *     "Order:output",
  33.      * })
  34.      */
  35.     private string $shannonOrderId;
  36.     /**
  37.      * @var array|null
  38.      * @ORM\Column(type="json", nullable=true)
  39.      */
  40.     private ?array $orderExpedition = [];
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=Order::class, inversedBy="expeditions")
  43.      * @ORM\JoinColumn(name="order_id")
  44.      */
  45.     private Order $order;
  46.     public function getId(): ?string
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getOrder(): Order
  51.     {
  52.         return $this->order;
  53.     }
  54.     public function setOrder(Order $order): self
  55.     {
  56.         $this->order $order;
  57.         return $this;
  58.     }
  59.     public function getShannonOrderId(): string
  60.     {
  61.         return $this->shannonOrderId;
  62.     }
  63.     public function setShannonOrderId(string $shannonOrderId): self
  64.     {
  65.         $this->shannonOrderId $shannonOrderId;
  66.         return $this;
  67.     }
  68.     public function getOrderExpedition(): ?array
  69.     {
  70.         return $this->orderExpedition;
  71.     }
  72.     public function setOrderExpedition(?array $orderExpedition): self
  73.     {
  74.         $this->orderExpedition $orderExpedition;
  75.         return $this;
  76.     }
  77. }