src/Entity/SaleOrderShipment.php line 17

Open in your IDE?
  1. <?php
  2.     
  3.     namespace App\Entity;
  4.     
  5.     use App\Repository\SaleOrderShipmentRepository;
  6.     use App\Traits\DateTrait;
  7.     use Doctrine\ORM\Mapping as ORM;
  8.     use JMS\Serializer\Annotation as Serializer;
  9.     use JMS\Serializer\Annotation\Expose;
  10.     use JMS\Serializer\Annotation\Groups;
  11.     
  12.     /**
  13.      * @ORM\Entity(repositoryClass=SaleOrderShipmentRepository::class)
  14.      *
  15.      * @Serializer\ExclusionPolicy("ALL")
  16.      */
  17.     class SaleOrderShipment
  18.     {
  19.         /**
  20.          * @ORM\Id
  21.          * @ORM\GeneratedValue
  22.          * @ORM\Column(type="integer")
  23.          *
  24.          * @Expose
  25.          * @Groups({
  26.          *     "sale_order",
  27.          *     "sale_order:updated",
  28.          *     "get:read"
  29.          * })
  30.          */
  31.         private $id;
  32.         
  33.         /**
  34.          * @TODO anciennement '$order' mais c'est un  mot réservé, on peut pas l'utiliser
  35.          * @ORM\ManyToOne(targetEntity=SaleOrder::class, inversedBy="shipments")
  36.          * @ORM\JoinColumn(nullable=false)
  37.          */
  38.         private $saleOrder;
  39.         
  40.         /**
  41.          * @ORM\Column(type="string", length=64, nullable=true)
  42.          *
  43.          * @Expose
  44.          * @Groups({
  45.          *     "sale_order",
  46.          *     "sale_order:updated",
  47.          *     "get:read",
  48.          *     "export_order_datatable"
  49.          * })
  50.          */
  51.         private $trackingCode;
  52.         
  53.         /**
  54.          * @ORM\Column(type="text")
  55.          *
  56.          * @Expose
  57.          * @Groups({
  58.          *     "sale_order",
  59.          *     "sale_order:updated"
  60.          * })
  61.          */
  62.         private $trackingUrl;
  63.         
  64.         /**
  65.          * @ORM\Column(type="decimal", precision=10, scale=3, nullable=true)
  66.          *
  67.          * @Expose
  68.          * @Groups({
  69.          *     "sale_order",
  70.          *     "sale_order:updated",
  71.          *     "get:read",
  72.          *     "export_order_datatable"
  73.          * })
  74.          */
  75.         private $weight;
  76.         
  77.         /**
  78.          * @ORM\Column(type="string", length=64, nullable=true)
  79.          *
  80.          * @Expose
  81.          * @Groups({
  82.          *     "sale_order",
  83.          *     "sale_order:updated",
  84.          *     "export_order_datatable"
  85.          * })
  86.          */
  87.         private $carrier;
  88.         
  89.         /**
  90.          * @ORM\Column(type="integer", nullable=true)
  91.          */
  92.         private $boId;
  93.         
  94.         use DateTrait;
  95.         
  96.         public function getId(): ?int
  97.         {
  98.             return $this->id;
  99.         }
  100.         
  101.         
  102.         public function getTrackingCode(): ?string
  103.         {
  104.             return $this->trackingCode;
  105.         }
  106.         
  107.         
  108.         public function setTrackingCode( ?string $trackingCode ): self
  109.         {
  110.             $this->trackingCode $trackingCode;
  111.             
  112.             return $this;
  113.         }
  114.         
  115.         
  116.         public function getTrackingUrl(): ?string
  117.         {
  118.             return $this->trackingUrl;
  119.         }
  120.         
  121.         
  122.         public function setTrackingUrlstring $trackingUrl ): self
  123.         {
  124.             $this->trackingUrl $trackingUrl;
  125.             
  126.             return $this;
  127.         }
  128.         
  129.         
  130.         public function getWeight(): ?string
  131.         {
  132.             return $this->weight;
  133.         }
  134.         
  135.         
  136.         public function setWeight( ?string $weight ): self
  137.         {
  138.             $this->weight $weight;
  139.             
  140.             return $this;
  141.         }
  142.         
  143.         
  144.         public function getCarrier(): ?string
  145.         {
  146.             return $this->carrier;
  147.         }
  148.         
  149.         
  150.         public function setCarrier( ?string $carrier ): self
  151.         {
  152.             $this->carrier $carrier;
  153.             
  154.             return $this;
  155.         }
  156.         
  157.         
  158.         public function getSaleOrder(): ?SaleOrder
  159.         {
  160.             return $this->saleOrder;
  161.         }
  162.         
  163.         
  164.         public function setSaleOrder( ?SaleOrder $saleOrder ): self
  165.         {
  166.             $this->saleOrder $saleOrder;
  167.             
  168.             return $this;
  169.         }
  170.         
  171.         
  172.         public function getBoId(): ?int
  173.         {
  174.             return $this->boId;
  175.         }
  176.         
  177.         
  178.         public function setBoId( ?int $boId ): self
  179.         {
  180.             $this->boId $boId;
  181.             
  182.             return $this;
  183.         }
  184.         
  185.         
  186.     }