app/Plugin/Api42/Entity/WebHook.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 Plugin\Api42\Entity;
  13. use DateTime;
  14. use Doctrine\ORM\Mapping as ORM;
  15. /**
  16.  * Class WebHook
  17.  *
  18.  * @ORM\Table(name="plg_api_webhook")
  19.  * @ORM\InheritanceType("SINGLE_TABLE")
  20.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.  * @ORM\HasLifecycleCallbacks()
  22.  * @ORM\Entity(repositoryClass="Plugin\Api42\Repository\WebHookRepository")
  23.  */
  24. class WebHook
  25. {
  26.     /**
  27.      * @var integer ID
  28.      *
  29.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(strategy="IDENTITY")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @var string Payload URL
  36.      *
  37.      * @ORM\Column(name="payload_url", type="string", length=1024)
  38.      */
  39.     private $payloadUrl;
  40.     /**
  41.      * @var string Secret
  42.      *
  43.      * @ORM\Column(name="secret", type="string", length=1024, nullable=true)
  44.      */
  45.     private $secret;
  46.     /**
  47.      * @var boolean Whether this WebHook is enabled.
  48.      *
  49.      * @ORM\Column(name="enabled", type="boolean")
  50.      */
  51.     private $enabled false;
  52.     /**
  53.      * @var DateTime
  54.      *
  55.      * @ORM\Column(name="create_date", type="datetimetz")
  56.      */
  57.     private $createDate;
  58.     /**
  59.      * @var DateTime
  60.      *
  61.      * @ORM\Column(name="update_date", type="datetimetz")
  62.      */
  63.     private $updateDate;
  64.     /**
  65.      * @return int
  66.      */
  67.     public function getId()
  68.     {
  69.         return $this->id;
  70.     }
  71.     /**
  72.      * @param int $id
  73.      */
  74.     public function setId($id)
  75.     {
  76.         $this->id $id;
  77.     }
  78.     /**
  79.      * @return string
  80.      */
  81.     public function getPayloadUrl()
  82.     {
  83.         return $this->payloadUrl;
  84.     }
  85.     /**
  86.      * @param string $payloadUrl
  87.      */
  88.     public function setPayloadUrl($payloadUrl)
  89.     {
  90.         $this->payloadUrl $payloadUrl;
  91.     }
  92.     /**
  93.      * @return string
  94.      */
  95.     public function getSecret()
  96.     {
  97.         return $this->secret;
  98.     }
  99.     /**
  100.      * @param string $secret
  101.      */
  102.     public function setSecret($secret)
  103.     {
  104.         $this->secret $secret;
  105.     }
  106.     /**
  107.      * @return bool
  108.      */
  109.     public function isEnabled()
  110.     {
  111.         return $this->enabled;
  112.     }
  113.     /**
  114.      * @param bool $enabled
  115.      */
  116.     public function setEnabled($enabled)
  117.     {
  118.         $this->enabled $enabled;
  119.     }
  120.     /**
  121.      * @return DateTime
  122.      */
  123.     public function getCreateDate()
  124.     {
  125.         return $this->createDate;
  126.     }
  127.     /**
  128.      * @param DateTime $createDate
  129.      */
  130.     public function setCreateDate(DateTime $createDate)
  131.     {
  132.         $this->createDate $createDate;
  133.     }
  134.     /**
  135.      * @return DateTime
  136.      */
  137.     public function getUpdateDate()
  138.     {
  139.         return $this->updateDate;
  140.     }
  141.     /**
  142.      * @param DateTime $updateDate
  143.      */
  144.     public function setUpdateDate(DateTime $updateDate)
  145.     {
  146.         $this->updateDate $updateDate;
  147.     }
  148. }