app/Plugin/AmazonPayV2_42/Entity/AmazonBanner.php line 25

Open in your IDE?
  1. <?php
  2. /*
  3. * Amazon Pay V2 for EC-CUBE4
  4. * Copyright(c) 2023 EC-CUBE CO.,LTD. all rights reserved.
  5. *
  6. * https://www.ec-cube.co.jp/
  7. *
  8. * This program is not free software.
  9. * It applies to terms of service.
  10. *
  11. */
  12. namespace Plugin\AmazonPayV2_42\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Eccube\Entity\AbstractEntity;
  15. /**
  16. * AmazonBanner
  17. *
  18. * @ORM\Table(name="plg_amazon_pay_v2_banner")
  19. * @ORM\Entity(repositoryClass="Plugin\AmazonPayV2_42\Repository\AmazonBannerRepository")
  20. */
  21. class AmazonBanner extends AbstractEntity
  22. {
  23. /** page用定数:トップページ */
  24. public const PAGE_TOP = 1;
  25. /** page用定数:カート画面 */
  26. public const PAGE_CART = 2;
  27. /**
  28. * @var int
  29. *
  30. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  31. * @ORM\Id
  32. * @ORM\GeneratedValue(strategy="IDENTITY")
  33. */
  34. private $id;
  35. /**
  36. * ページ種類
  37. *
  38. * @var int
  39. *
  40. * @ORM\Column(name="page", type="integer", options={"unsigned":true})
  41. */
  42. private $page;
  43. /**
  44. * 画面へ表示するラベル
  45. * @var string
  46. *
  47. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  48. */
  49. private $name;
  50. /**
  51. * バナーのソースコード
  52. * @var string
  53. *
  54. * @ORM\Column(name="code", type="string", length=1024, nullable=true)
  55. */
  56. private $code;
  57. /**
  58. * デフォルト選択値かどうか
  59. * ただのdefaultは予約語なのでis_をつける
  60. * @var boolean
  61. *
  62. * @ORM\Column(name="is_default", type="boolean", nullable=true, options={"default":false})
  63. */
  64. private $isDefault;
  65. /**
  66. * Get the value of id
  67. *
  68. * @return int
  69. */
  70. public function getId()
  71. {
  72. return $this->id;
  73. }
  74. /**
  75. * Set the value of id
  76. *
  77. * @param int $id
  78. *
  79. * @return self
  80. */
  81. public function setId(int $id)
  82. {
  83. $this->id = $id;
  84. return $this;
  85. }
  86. /**
  87. * Get ページ種類
  88. *
  89. * @return int
  90. */
  91. public function getPage()
  92. {
  93. return $this->page;
  94. }
  95. /**
  96. * Set ページ種類
  97. *
  98. * @param int $page ページ種類
  99. *
  100. * @return self
  101. */
  102. public function setPage(int $page)
  103. {
  104. $this->page = $page;
  105. return $this;
  106. }
  107. /**
  108. * Get the value of name
  109. *
  110. * @return string
  111. */
  112. public function getName()
  113. {
  114. return $this->name;
  115. }
  116. /**
  117. * Set the value of name
  118. *
  119. * @param string $name
  120. *
  121. * @return self
  122. */
  123. public function setName(string $name)
  124. {
  125. $this->name = $name;
  126. return $this;
  127. }
  128. /**
  129. * Get the value of code
  130. *
  131. * @return string
  132. */
  133. public function getCode()
  134. {
  135. return $this->code;
  136. }
  137. /**
  138. * Set the value of code
  139. *
  140. * @param string $code
  141. *
  142. * @return self
  143. */
  144. public function setCode(string $code)
  145. {
  146. $this->code = $code;
  147. return $this;
  148. }
  149. /**
  150. * Get ただのdefaultは予約語なのでis_をつける
  151. *
  152. * @return boolean
  153. */
  154. public function getIsDefault()
  155. {
  156. return $this->isDefault;
  157. }
  158. /**
  159. * Set ただのdefaultは予約語なのでis_をつける
  160. *
  161. * @param boolean $isDefault ただのdefaultは予約語なのでis_をつける
  162. *
  163. * @return self
  164. */
  165. public function setIsDefault(bool $isDefault)
  166. {
  167. $this->isDefault = $isDefault;
  168. return $this;
  169. }
  170. }