<?php
namespace App\Entity\Catalog;
use App\Repository\Catalog\ExpeditionRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Ramsey\Uuid\Doctrine\UuidGenerator;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName;
/**
* @ORM\Entity(repositoryClass=ExpeditionRepository::class)
*/
class Expedition
{
/**
* Hook timestampable behavior
* updates createdAt, updatedAt fields
*/
use TimestampableEntity;
/**
* @ORM\Id
* @ORM\Column(type="uuid", unique=true)
* @ORM\GeneratedValue(strategy="CUSTOM")
* @ORM\CustomIdGenerator(class=UuidGenerator::class)
*/
private string $id;
/**
* @var string
* @ORM\Column(type="string")
* @SerializedName("shannon_order_id")
* @Groups({
* "get_order_by_user",
* "Order:output",
* })
*/
private string $shannonOrderId;
/**
* @var array|null
* @ORM\Column(type="json", nullable=true)
*/
private ?array $orderExpedition = [];
/**
* @ORM\ManyToOne(targetEntity=Order::class, inversedBy="expeditions")
* @ORM\JoinColumn(name="order_id")
*/
private Order $order;
public function getId(): ?string
{
return $this->id;
}
public function getOrder(): Order
{
return $this->order;
}
public function setOrder(Order $order): self
{
$this->order = $order;
return $this;
}
public function getShannonOrderId(): string
{
return $this->shannonOrderId;
}
public function setShannonOrderId(string $shannonOrderId): self
{
$this->shannonOrderId = $shannonOrderId;
return $this;
}
public function getOrderExpedition(): ?array
{
return $this->orderExpedition;
}
public function setOrderExpedition(?array $orderExpedition): self
{
$this->orderExpedition = $orderExpedition;
return $this;
}
}