src/Eccube/Entity/DeliveryDuration.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of EC-CUBE
  4. *
  5. * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6. *
  7. * http://www.ec-cube.co.jp/
  8. *
  9. * For the full copyright and license information, please view the LICENSE
  10. * file that was distributed with this source code.
  11. */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\DeliveryDuration')) {
  15. /**
  16. * DeliveryDuration
  17. *
  18. * @ORM\Table(name="dtb_delivery_duration")
  19. * @ORM\InheritanceType("SINGLE_TABLE")
  20. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21. * @ORM\HasLifecycleCallbacks()
  22. * @ORM\Entity(repositoryClass="Eccube\Repository\DeliveryDurationRepository")
  23. */
  24. class DeliveryDuration extends \Eccube\Entity\AbstractEntity
  25. {
  26. /**
  27. * @return string
  28. */
  29. public function __toString()
  30. {
  31. return $this->getName();
  32. }
  33. /**
  34. * @var int
  35. *
  36. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  37. * @ORM\Id
  38. * @ORM\GeneratedValue(strategy="IDENTITY")
  39. */
  40. private $id;
  41. /**
  42. * @var string|null
  43. *
  44. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  45. */
  46. private $name;
  47. /**
  48. * @var int
  49. *
  50. * @ORM\Column(name="duration", type="smallint", options={"default":0})
  51. */
  52. private $duration = 0;
  53. /**
  54. * @var int
  55. *
  56. * @ORM\Column(name="sort_no", type="integer", options={"unsigned":true})
  57. */
  58. private $sort_no;
  59. /**
  60. * Get id.
  61. *
  62. * @return int
  63. */
  64. public function getId()
  65. {
  66. return $this->id;
  67. }
  68. /**
  69. * Set name.
  70. *
  71. * @param string|null $name
  72. *
  73. * @return DeliveryDuration
  74. */
  75. public function setName($name = null)
  76. {
  77. $this->name = $name;
  78. return $this;
  79. }
  80. /**
  81. * Get name.
  82. *
  83. * @return string|null
  84. */
  85. public function getName()
  86. {
  87. return $this->name;
  88. }
  89. /**
  90. * Set duration.
  91. *
  92. * @param int $duration
  93. *
  94. * @return DeliveryDuration
  95. */
  96. public function setDuration($duration)
  97. {
  98. $this->duration = $duration;
  99. return $this;
  100. }
  101. /**
  102. * Get duration.
  103. *
  104. * @return int
  105. */
  106. public function getDuration()
  107. {
  108. return $this->duration;
  109. }
  110. /**
  111. * Set sortNo.
  112. *
  113. * @param int $sortNo
  114. *
  115. * @return DeliveryDuration
  116. */
  117. public function setSortNo($sortNo)
  118. {
  119. $this->sort_no = $sortNo;
  120. return $this;
  121. }
  122. /**
  123. * Get sortNo.
  124. *
  125. * @return int
  126. */
  127. public function getSortNo()
  128. {
  129. return $this->sort_no;
  130. }
  131. }
  132. }