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

Open in your IDE?
  1. <?php
  2. /*
  3.  * Amazon Pay V2 for EC-CUBE4.2
  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.  * Config
  17.  *
  18.  * @ORM\Table(name="plg_amazon_pay_v2_config")
  19.  * @ORM\Entity(repositoryClass="Plugin\AmazonPayV2_42\Repository\ConfigRepository")
  20.  */
  21. class Config extends AbstractEntity
  22. {
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="IDENTITY")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @ORM\Column(name="amazon_account_mode", type="integer", nullable=true)
  33.      */
  34.     private $amazon_account_mode;
  35.     /**
  36.      * @var integer
  37.      *
  38.      * @ORM\Column(name="env", type="integer")
  39.      */
  40.     private $env;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="seller_id", type="string", length=255, nullable=true)
  45.      */
  46.     private $seller_id;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="client_id", type="string", length=255, nullable=true)
  51.      */
  52.     private $client_id;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="test_client_id", type="string", length=255, nullable=true)
  57.      */
  58.     private $test_client_id;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="prod_key", type="string", length=255, nullable=true)
  63.      */
  64.     private $prod_key;
  65.     /**
  66.      * @var string
  67.      *
  68.      * @ORM\Column(name="public_key_id", type="string", length=255, nullable=true)
  69.      */
  70.     private $public_key_id;
  71.     /**
  72.      * @var string
  73.      *
  74.      * @ORM\Column(name="private_key_path", type="string", length=255, nullable=true)
  75.      */
  76.     private $private_key_path;
  77.     /**
  78.      * @var integer
  79.      *
  80.      * @ORM\Column(name="sale", type="integer")
  81.      */
  82.     private $sale;
  83.     /**
  84.      * @var boolean
  85.      *
  86.      * @ORM\Column(name="use_confirm_page", type="boolean", options={"default":false})
  87.      */
  88.     private $use_confirm_page;
  89.     /**
  90.      * @var boolean
  91.      *
  92.      * @ORM\Column(name="auto_login", type="boolean", options={"default":false})
  93.      */
  94.     private $auto_login;
  95.     /**
  96.      * @var boolean
  97.      *
  98.      * @ORM\Column(name="login_required", type="boolean", options={"default":false})
  99.      */
  100.     private $login_required;
  101.     /**
  102.      * @var boolean
  103.      *
  104.      * @ORM\Column(name="order_correct", type="boolean", options={"default":false})
  105.      */
  106.     private $order_correct;
  107.     /**
  108.      * @var string|null
  109.      *
  110.      * @ORM\Column(name="mail_notices", type="text", nullable=true)
  111.      */
  112.     private $mail_notices;
  113.     /**
  114.      * @var boolean
  115.      *
  116.      * @ORM\Column(name="use_cart_button", type="boolean", options={"default":true})
  117.      */
  118.     private $use_cart_button;
  119.     /**
  120.      * @var string
  121.      *
  122.      * @ORM\Column(name="cart_button_color", type="string", length=255, nullable=true, options={"default":"Gold"})
  123.      */
  124.     private $cart_button_color;
  125.     /**
  126.      * @var string
  127.      *
  128.      * @ORM\Column(name="cart_button_place", type="string", length=255, nullable=true, options={"default":1})
  129.      */
  130.     private $cart_button_place;
  131.     /**
  132.      * @var boolean
  133.      *
  134.      * @ORM\Column(name="use_mypage_login_button", type="boolean", options={"default":false})
  135.      */
  136.     private $use_mypage_login_button;
  137.     /**
  138.      * @var string
  139.      *
  140.      * @ORM\Column(name="mypage_login_button_color", type="string", length=255, nullable=true, options={"default":"Gold"})
  141.      */
  142.     private $mypage_login_button_color;
  143.     /**
  144.      * @var string
  145.      *
  146.      * @ORM\Column(name="mypage_login_button_place", type="string", length=255, nullable=true, options={"default":1})
  147.      */
  148.     private $mypage_login_button_place;
  149.     /**
  150.      * @var boolean
  151.      *
  152.      * @ORM\Column(name="use_amazon_banner_on_top", type="boolean", options={"default":true})
  153.      */
  154.     private $use_amazon_banner_on_top true;
  155.     /**
  156.      * @var boolean
  157.      *
  158.      * @ORM\Column(name="use_amazon_banner_on_cart", type="boolean", options={"default":true})
  159.      */
  160.     private $use_amazon_banner_on_cart true;
  161.     // NOTE OneToOneにしたいが、そうするとカラムが生成されない
  162.     /**
  163.      * @var AmazonBanner
  164.      * 
  165.      * @ORM\Column(name="amazon_banner_id_on_top", type="integer", nullable=true)
  166.      */
  167.     private $amazon_banner_size_on_top;
  168.     // NOTE OneToOneにしたいが、そうするとカラムが生成されない
  169.     /**
  170.      * @var AmazonBanner
  171.      * 
  172.      * @ORM\Column(name="amazon_banner_id_on_cart", type="integer", nullable=true)
  173.      */
  174.     private $amazon_banner_size_on_cart;
  175.     /**
  176.      * Amazon特典告知バナー(トップページ)の配置方法(自動/手動)
  177.      *
  178.      * @var string
  179.      * 
  180.      * @ORM\Column(name="amazon_banner_place_on_top", type="string", length=255, nullable=true, options={"default":1})
  181.      */
  182.     private $amazon_banner_place_on_top 1;
  183.     /**
  184.      * Amazon特典告知バナー(カート画面)の配置方法(自動/手動)
  185.      *
  186.      * @var string
  187.      * 
  188.      * @ORM\Column(name="amazon_banner_place_on_cart", type="string", length=255, nullable=true, options={"default":1})
  189.      */
  190.     private $amazon_banner_place_on_cart 1;
  191.     /**
  192.      * Constructor
  193.      */
  194.     public function __construct()
  195.     { }
  196.     /**
  197.      * {@inheritdoc}
  198.      */
  199.     public function getId()
  200.     {
  201.         return $this->id;
  202.     }
  203.     /**
  204.      * {@inheritdoc}
  205.      */
  206.     public function getAmazonAccountMode()
  207.     {
  208.         return $this->amazon_account_mode;
  209.     }
  210.     /**
  211.      * {@inheritdoc}
  212.      */
  213.     public function setAmazonAccountMode($amazon_account_mode null)
  214.     {
  215.         $this->amazon_account_mode $amazon_account_mode;
  216.         return $this;
  217.     }
  218.     /**
  219.      * {@inheritdoc}
  220.      */
  221.     public function getEnv()
  222.     {
  223.         return $this->env;
  224.     }
  225.     /**
  226.      * {@inheritdoc}
  227.      */
  228.     public function setEnv($env)
  229.     {
  230.         $this->env $env;
  231.         return $this;
  232.     }
  233.     /**
  234.      * {@inheritdoc}
  235.      */
  236.     public function getSellerId()
  237.     {
  238.         return $this->seller_id;
  239.     }
  240.     /**
  241.      * {@inheritdoc}
  242.      */
  243.     public function setSellerId($seller_id)
  244.     {
  245.         $this->seller_id $seller_id;
  246.         return $this;
  247.     }
  248.     /**
  249.      * {@inheritdoc}
  250.      */
  251.     public function getPublicKeyId()
  252.     {
  253.         return $this->public_key_id;
  254.     }
  255.     /**
  256.      * {@inheritdoc}
  257.      */
  258.     public function setPublicKeyId($public_key_id)
  259.     {
  260.         $this->public_key_id $public_key_id;
  261.         return $this;
  262.     }
  263.     /**
  264.      * {@inheritdoc}
  265.      */
  266.     public function getPrivateKeyPath()
  267.     {
  268.         return $this->private_key_path;
  269.     }
  270.     /**
  271.      * {@inheritdoc}
  272.      */
  273.     public function setPrivateKeyPath($private_key_path)
  274.     {
  275.         $this->private_key_path $private_key_path;
  276.         return $this;
  277.     }
  278.     /**
  279.      * {@inheritdoc}
  280.      */
  281.     public function getClientId()
  282.     {
  283.         return $this->client_id;
  284.     }
  285.     /**
  286.      * {@inheritdoc}
  287.      */
  288.     public function setClientId($client_id)
  289.     {
  290.         $this->client_id $client_id;
  291.         return $this;
  292.     }
  293.     /**
  294.      * {@inheritdoc}
  295.      */
  296.     public function getTestClientId()
  297.     {
  298.         return $this->test_client_id;
  299.     }
  300.     /**
  301.      * {@inheritdoc}
  302.      */
  303.     public function setTestClientId($test_client_id)
  304.     {
  305.         $this->test_client_id $test_client_id;
  306.         return $this;
  307.     }
  308.     /**
  309.      * {@inheritdoc}
  310.      */
  311.     public function getProdKey()
  312.     {
  313.         return $this->prod_key;
  314.     }
  315.     /**
  316.      * {@inheritdoc}
  317.      */
  318.     public function setProdKey($prod_key)
  319.     {
  320.         $this->prod_key $prod_key;
  321.         return $this;
  322.     }
  323.     /**
  324.      * {@inheritdoc}
  325.      */
  326.     public function getSale()
  327.     {
  328.         return $this->sale;
  329.     }
  330.     /**
  331.      * {@inheritdoc}
  332.      */
  333.     public function setSale($sale)
  334.     {
  335.         $this->sale $sale;
  336.         return $this;
  337.     }
  338.     /**
  339.      * {@inheritdoc}
  340.      */
  341.     public function getAutoLogin()
  342.     {
  343.         return $this->auto_login;
  344.     }
  345.     /**
  346.      * {@inheritdoc}
  347.      */
  348.     public function setAutoLogin($auto_login)
  349.     {
  350.         $this->auto_login $auto_login;
  351.         return $this;
  352.     }
  353.     /**
  354.      * {@inheritdoc}
  355.      */
  356.     public function getLoginRequired()
  357.     {
  358.         return $this->login_required;
  359.     }
  360.     /**
  361.      * {@inheritdoc}
  362.      */
  363.     public function setLoginRequired($login_required)
  364.     {
  365.         $this->login_required $login_required;
  366.         return $this;
  367.     }
  368.     /**
  369.      * {@inheritdoc}
  370.      */
  371.     public function getOrderCorrect()
  372.     {
  373.         return $this->order_correct;
  374.     }
  375.     /**
  376.      * {@inheritdoc}
  377.      */
  378.     public function setOrderCorrect($order_correct)
  379.     {
  380.         $this->order_correct $order_correct;
  381.         return $this;
  382.     }
  383.     /**
  384.      * {@inheritdoc}
  385.      */
  386.     public function getMailNotices()
  387.     {
  388.         return $this->mail_notices;
  389.     }
  390.     /**
  391.      * {@inheritdoc}
  392.      */
  393.     public function setMailNotices($mail_notices)
  394.     {
  395.         $this->mail_notices $mail_notices;
  396.         return $this;
  397.     }
  398.     /**
  399.      * {@inheritdoc}
  400.      */
  401.     public function getUseConfirmPage()
  402.     {
  403.         return $this->use_confirm_page;
  404.     }
  405.     /**
  406.      * {@inheritdoc}
  407.      */
  408.     public function setUseConfirmPage($use_confirm_page)
  409.     {
  410.         $this->use_confirm_page $use_confirm_page;
  411.         return $this;
  412.     }
  413.     /**
  414.      * {@inheritdoc}
  415.      */
  416.     public function getUseCartButton()
  417.     {
  418.         return $this->use_cart_button;
  419.     }
  420.     /**
  421.      * {@inheritdoc}
  422.      */
  423.     public function setUseCartButton($use_cart_button)
  424.     {
  425.         $this->use_cart_button $use_cart_button;
  426.         return $this;
  427.     }
  428.     /**
  429.      * {@inheritdoc}
  430.      */
  431.     public function getCartButtonColor()
  432.     {
  433.         return $this->cart_button_color;
  434.     }
  435.     /**
  436.      * {@inheritdoc}
  437.      */
  438.     public function setCartButtonColor($cart_button_color)
  439.     {
  440.         $this->cart_button_color $cart_button_color;
  441.         return $this;
  442.     }
  443.     /**
  444.      * {@inheritdoc}
  445.      */
  446.     public function getCartButtonPlace()
  447.     {
  448.         return $this->cart_button_place;
  449.     }
  450.     /**
  451.      * {@inheritdoc}
  452.      */
  453.     public function setCartButtonPlace($cart_button_place)
  454.     {
  455.         $this->cart_button_place $cart_button_place;
  456.         return $this;
  457.     }
  458.     /**
  459.      * {@inheritdoc}
  460.      */
  461.     public function getUseMypageLoginButton()
  462.     {
  463.         return $this->use_mypage_login_button;
  464.     }
  465.     /**
  466.      * {@inheritdoc}
  467.      */
  468.     public function setUseMypageLoginButton($use_mypage_login_button)
  469.     {
  470.         $this->use_mypage_login_button $use_mypage_login_button;
  471.         return $this;
  472.     }
  473.     /**
  474.      * {@inheritdoc}
  475.      */
  476.     public function getMypageLoginButtonColor()
  477.     {
  478.         return $this->mypage_login_button_color;
  479.     }
  480.     /**
  481.      * {@inheritdoc}
  482.      */
  483.     public function setMypageLoginButtonColor($mypage_login_button_color)
  484.     {
  485.         $this->mypage_login_button_color $mypage_login_button_color;
  486.         return $this;
  487.     }
  488.     /**
  489.      * {@inheritdoc}
  490.      */
  491.     public function getMypageLoginButtonPlace()
  492.     {
  493.         return $this->mypage_login_button_place;
  494.     }
  495.     /**
  496.      * {@inheritdoc}
  497.      */
  498.     public function setMypageLoginButtonPlace($mypage_login_button_place)
  499.     {
  500.         $this->mypage_login_button_place $mypage_login_button_place;
  501.         return $this;
  502.     }
  503.     /**
  504.      * Get the value of use_amazon_banner_on_top
  505.      */ 
  506.     public function getUseAmazonBannerOnTop()
  507.     {
  508.         return isset($this->use_amazon_banner_on_top) ? $this->use_amazon_banner_on_top true;
  509.     }
  510.     /**
  511.      * Set the value of use_amazon_banner_on_top
  512.      *
  513.      * @return  self
  514.      */ 
  515.     public function setUseAmazonBannerOnTop($use_amazon_banner_on_top)
  516.     {
  517.         $this->use_amazon_banner_on_top $use_amazon_banner_on_top;
  518.         return $this;
  519.     }
  520.     /**
  521.      * Get the value of use_amazon_banner_on_cart
  522.      */ 
  523.     public function getUseAmazonBannerOnCart()
  524.     {
  525.         return isset($this->use_amazon_banner_on_cart) ? $this->use_amazon_banner_on_cart true;
  526.     }
  527.     /**
  528.      * Set the value of use_amazon_banner_on_cart
  529.      *
  530.      * @return  self
  531.      */ 
  532.     public function setUseAmazonBannerOnCart($use_amazon_banner_on_cart)
  533.     {
  534.         $this->use_amazon_banner_on_cart $use_amazon_banner_on_cart;
  535.         return $this;
  536.     }
  537.     /**
  538.      * Get the value of amazon_banner_size_on_top
  539.      */ 
  540.     public function getAmazonBannerSizeOnTop()
  541.     {
  542.         return $this->amazon_banner_size_on_top;
  543.     }
  544.     /**
  545.      * Set the value of amazon_banner_size_on_top
  546.      *
  547.      * @return  self
  548.      */ 
  549.     public function setAmazonBannerSizeOnTop($amazon_banner_size_on_top)
  550.     {
  551.         $this->amazon_banner_size_on_top $amazon_banner_size_on_top;
  552.         return $this;
  553.     }
  554.     /**
  555.      * Get the value of amazon_banner_size_on_cart
  556.      *
  557.      * @return  AmazonBanner
  558.      */ 
  559.     public function getAmazonBannerSizeOnCart()
  560.     {
  561.         return $this->amazon_banner_size_on_cart;
  562.     }
  563.     /**
  564.      * Set the value of amazon_banner_size_on_cart
  565.      *
  566.      * @param  AmazonBanner  $amazon_banner_size_on_cart
  567.      *
  568.      * @return  self
  569.      */ 
  570.     public function setAmazonBannerSizeOnCart($amazon_banner_size_on_cart)
  571.     {
  572.         $this->amazon_banner_size_on_cart $amazon_banner_size_on_cart;
  573.         return $this;
  574.     }
  575.     /**
  576.      * Get amazon特典告知バナー(トップページ)の配置方法(自動/手動)
  577.      *
  578.      * @return  string
  579.      */ 
  580.     public function getAmazonBannerPlaceOnTop()
  581.     {
  582.         if (!isset($this->amazon_banner_place_on_top)) {
  583.             return 1// 1:自動
  584.         }
  585.         return $this->amazon_banner_place_on_top;
  586.     }
  587.     /**
  588.      * Set amazon特典告知バナー(トップページ)の配置方法(自動/手動)
  589.      *
  590.      * @param  string  $amazon_banner_place_on_top  Amazon特典告知バナー(トップページ)の配置方法(自動/手動)
  591.      *
  592.      * @return  self
  593.      */ 
  594.     public function setAmazonBannerPlaceOnTop(string $amazon_banner_place_on_top)
  595.     {
  596.         $this->amazon_banner_place_on_top $amazon_banner_place_on_top;
  597.         return $this;
  598.     }
  599.     /**
  600.      * Get amazon特典告知バナー(カート画面)の配置方法(自動/手動)
  601.      *
  602.      * @return  string
  603.      */ 
  604.     public function getAmazonBannerPlaceOnCart()
  605.     {
  606.         if (!isset($this->amazon_banner_place_on_cart)) {
  607.             return 1// 1:自動
  608.         }
  609.         return $this->amazon_banner_place_on_cart;
  610.     }
  611.     /**
  612.      * Set amazon特典告知バナー(カート画面)の配置方法(自動/手動)
  613.      *
  614.      * @param  string  $amazon_banner_place_on_cart  Amazon特典告知バナー(カート画面)の配置方法(自動/手動)
  615.      *
  616.      * @return  self
  617.      */ 
  618.     public function setAmazonBannerPlaceOnCart(string $amazon_banner_place_on_cart)
  619.     {
  620.         $this->amazon_banner_place_on_cart $amazon_banner_place_on_cart;
  621.         return $this;
  622.     }
  623. }