src/Entity/System/TrackingStatus.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="ps_tracking_status", indexes={
  7. *
  8. * @ORM\Index(name="ps_tracking_status_active_index", columns={"active"})
  9. * })
  10. *
  11. * @ORM\Entity(repositoryClass="App\Repository\System\TrackingStatusRepository")
  12. */
  13. class TrackingStatus
  14. {
  15. public const WAITING_TO_COMPUTE = 1;
  16. public const PENDING = 2;
  17. public const INFO_RECEIVED = 3;
  18. public const PROCESSING = 4;
  19. public const DEPARTED = 5;
  20. public const IN_TRANSIT = 6;
  21. public const OUT_FOR_DELIVERY = 7;
  22. public const FAILED_ATTEMPT = 8;
  23. public const EXCEPTION = 9;
  24. public const RETURN = 10;
  25. public const ON_HOLD = 11;
  26. public const DELAY = 12;
  27. public const PICKUP_POINT = 13;
  28. public const DAMAGE = 14;
  29. public const LOST = 15;
  30. public const RETURNED = 16;
  31. public const DELIVERED = 17;
  32. public const VOIDED = 18;
  33. public const CUSTOMS = 19;
  34. public const WRONG_ADDRESS = 20;
  35. public const RETURNING = 21;
  36. public const READY_TO_SHIP = 22;
  37. public const CUSTOMS_ISSUE = 23;
  38. public const IN_TRANSIT_STATUS_KEY = 'IN_TRANSIT';
  39. public const DELIVERED_STATUS_KEY = 'DELIVERED';
  40. public const DELIVERED_EXCEPTION_STATUS_KEY = 'DELIVERY_EXCEPTION';
  41. public const OTHER_EXCEPTION_STATUS_KEY = 'OTHER_EXCEPTION';
  42. public const READY_TO_SHIP_STATUS_KEY = 'READY_TO_SHIP';
  43. public const OUT_FOR_DELIVERY_STATUS_KEY = 'OUT_FOR_DELIVERY';
  44. /**
  45. * @var int
  46. *
  47. * @ORM\Id
  48. *
  49. * @ORM\GeneratedValue(strategy="AUTO")
  50. *
  51. * @ORM\Column(type="integer", name="id_tracking_status")
  52. */
  53. private $id;
  54. /**
  55. * @var string
  56. *
  57. * @ORM\Column(type="string", length=20, unique=true)
  58. */
  59. private $key;
  60. /**
  61. * @var bool
  62. *
  63. * @ORM\Column(type="boolean")
  64. */
  65. private $active;
  66. /**
  67. * @var ArrayCollection<int, TrackingStatusLang>
  68. *
  69. * @ORM\OneToMany(targetEntity="App\Entity\System\TrackingStatusLang", mappedBy="trackingStatusId")
  70. */
  71. private $trackingStatusLangs;
  72. /**
  73. * @return mixed
  74. */
  75. public function getId()
  76. {
  77. return $this->id;
  78. }
  79. /**
  80. * @param int $id
  81. *
  82. * @return TrackingStatus
  83. */
  84. public function setId(int $id): TrackingStatus
  85. {
  86. $this->id = $id;
  87. return $this;
  88. }
  89. public function isActive(): bool
  90. {
  91. return $this->active;
  92. }
  93. public function setActive(bool $active): TrackingStatus
  94. {
  95. $this->active = $active;
  96. return $this;
  97. }
  98. public function getKey(): string
  99. {
  100. return $this->key;
  101. }
  102. public function setKey(string $key): TrackingStatus
  103. {
  104. $this->key = $key;
  105. return $this;
  106. }
  107. /**
  108. * @param ArrayCollection<int, TrackingStatusLang> $trackingStatusLangs
  109. */
  110. public function setTrackingStatusLangs($trackingStatusLangs): TrackingStatus
  111. {
  112. $this->trackingStatusLangs = $trackingStatusLangs;
  113. return $this;
  114. }
  115. /**
  116. * @return ArrayCollection<int, TrackingStatusLang>
  117. */
  118. public function getTrackingStatusLangs()
  119. {
  120. return $this->trackingStatusLangs;
  121. }
  122. }