app/proxy/entity/src/Eccube/Entity/Customer.php line 32

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. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  15. use Symfony\Component\Security\Core\User\UserInterface;
  16. use Symfony\Component\Validator\Constraints as Assert;
  17. use Symfony\Component\Validator\Mapping\ClassMetadata;
  18.     /**
  19.      * Customer
  20.      *
  21.      * @ORM\Table(name="dtb_customer", uniqueConstraints={@ORM\UniqueConstraint(name="secret_key", columns={"secret_key"})}, indexes={@ORM\Index(name="dtb_customer_buy_times_idx", columns={"buy_times"}), @ORM\Index(name="dtb_customer_buy_total_idx", columns={"buy_total"}), @ORM\Index(name="dtb_customer_create_date_idx", columns={"create_date"}), @ORM\Index(name="dtb_customer_update_date_idx", columns={"update_date"}), @ORM\Index(name="dtb_customer_last_buy_date_idx", columns={"last_buy_date"}), @ORM\Index(name="dtb_customer_email_idx", columns={"email"})})
  22.      * @ORM\InheritanceType("SINGLE_TABLE")
  23.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  24.      * @ORM\HasLifecycleCallbacks()
  25.      * @ORM\Entity(repositoryClass="Eccube\Repository\CustomerRepository")
  26.      */
  27.     class Customer extends \Eccube\Entity\AbstractEntity implements UserInterface\Serializable
  28.     {
  29.     use \Plugin\EccubePaymentLite42\Entity\CustomerTrait;
  30.         /**
  31.          * @var int
  32.          *
  33.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  34.          * @ORM\Id
  35.          * @ORM\GeneratedValue(strategy="IDENTITY")
  36.          */
  37.         private $id;
  38.         /**
  39.          * @var string
  40.          *
  41.          * @ORM\Column(name="name01", type="string", length=255)
  42.          */
  43.         private $name01;
  44.         /**
  45.          * @var string
  46.          *
  47.          * @ORM\Column(name="name02", type="string", length=255)
  48.          */
  49.         private $name02;
  50.         /**
  51.          * @var string|null
  52.          *
  53.          * @ORM\Column(name="kana01", type="string", length=255, nullable=true)
  54.          */
  55.         private $kana01;
  56.         /**
  57.          * @var string|null
  58.          *
  59.          * @ORM\Column(name="kana02", type="string", length=255, nullable=true)
  60.          */
  61.         private $kana02;
  62.         /**
  63.          * @var string|null
  64.          *
  65.          * @ORM\Column(name="company_name", type="string", length=255, nullable=true)
  66.          */
  67.         private $company_name;
  68.         /**
  69.          * @var string|null
  70.          *
  71.          * @ORM\Column(name="postal_code", type="string", length=8, nullable=true)
  72.          */
  73.         private $postal_code;
  74.         /**
  75.          * @var string|null
  76.          *
  77.          * @ORM\Column(name="addr01", type="string", length=255, nullable=true)
  78.          */
  79.         private $addr01;
  80.         /**
  81.          * @var string|null
  82.          *
  83.          * @ORM\Column(name="addr02", type="string", length=255, nullable=true)
  84.          */
  85.         private $addr02;
  86.         /**
  87.          * @var string
  88.          *
  89.          * @ORM\Column(name="email", type="string", length=255)
  90.          */
  91.         private $email;
  92.         /**
  93.          * @var string|null
  94.          *
  95.          * @ORM\Column(name="phone_number", type="string", length=14, nullable=true)
  96.          */
  97.         private $phone_number;
  98.         /**
  99.          * @var \DateTime|null
  100.          *
  101.          * @ORM\Column(name="birth", type="datetimetz", nullable=true)
  102.          */
  103.         private $birth;
  104.         /**
  105.          * @Assert\NotBlank()
  106.          * @Assert\Length(max=4096)
  107.          */
  108.         private $plain_password;
  109.         /**
  110.          * @var string|null
  111.          *
  112.          * @ORM\Column(name="password", type="string", length=255)
  113.          */
  114.         private $password;
  115.         /**
  116.          * @var string|null
  117.          *
  118.          * @ORM\Column(name="salt", type="string", length=255, nullable=true)
  119.          */
  120.         private $salt;
  121.         /**
  122.          * @var string
  123.          *
  124.          * @ORM\Column(name="secret_key", type="string", length=255)
  125.          */
  126.         private $secret_key;
  127.         /**
  128.          * @var \DateTime|null
  129.          *
  130.          * @ORM\Column(name="first_buy_date", type="datetimetz", nullable=true)
  131.          */
  132.         private $first_buy_date;
  133.         /**
  134.          * @var \DateTime|null
  135.          *
  136.          * @ORM\Column(name="last_buy_date", type="datetimetz", nullable=true)
  137.          */
  138.         private $last_buy_date;
  139.         /**
  140.          * @var string|null
  141.          *
  142.          * @ORM\Column(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0})
  143.          */
  144.         private $buy_times 0;
  145.         /**
  146.          * @var string|null
  147.          *
  148.          * @ORM\Column(name="buy_total", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0})
  149.          */
  150.         private $buy_total 0;
  151.         /**
  152.          * @var string|null
  153.          *
  154.          * @ORM\Column(name="note", type="string", length=4000, nullable=true)
  155.          */
  156.         private $note;
  157.         /**
  158.          * @var string|null
  159.          *
  160.          * @ORM\Column(name="reset_key", type="string", length=255, nullable=true)
  161.          */
  162.         private $reset_key;
  163.         /**
  164.          * @var \DateTime|null
  165.          *
  166.          * @ORM\Column(name="reset_expire", type="datetimetz", nullable=true)
  167.          */
  168.         private $reset_expire;
  169.         /**
  170.          * @var string
  171.          *
  172.          * @ORM\Column(name="point", type="decimal", precision=12, scale=0, options={"unsigned":false,"default":0})
  173.          */
  174.         private $point '0';
  175.         /**
  176.          * @var string
  177.          *
  178.          * @ORM\Column(name="pointwbike", type="decimal", precision=12, scale=0, nullable=true, options={"unsigned":false,"default":0})
  179.          */
  180.         private $pointwbike '0';
  181.         /**
  182.          * @var \DateTime
  183.          *
  184.          * @ORM\Column(name="create_date", type="datetimetz")
  185.          */
  186.         private $create_date;
  187.         /**
  188.          * @var \DateTime
  189.          *
  190.          * @ORM\Column(name="update_date", type="datetimetz")
  191.          */
  192.         private $update_date;
  193.         /**
  194.          * @var \Doctrine\Common\Collections\Collection
  195.          *
  196.          * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"})
  197.          */
  198.         private $CustomerFavoriteProducts;
  199.         /**
  200.          * @var \Doctrine\Common\Collections\Collection
  201.          *
  202.          * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"})
  203.          * @ORM\OrderBy({
  204.          *     "id"="ASC"
  205.          * })
  206.          */
  207.         private $CustomerAddresses;
  208.         /**
  209.          * @var \Doctrine\Common\Collections\Collection
  210.          *
  211.          * @ORM\OneToMany(targetEntity="Eccube\Entity\Order", mappedBy="Customer")
  212.          */
  213.         private $Orders;
  214.         /**
  215.          * @var \Eccube\Entity\Master\CustomerStatus
  216.          *
  217.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerStatus")
  218.          * @ORM\JoinColumns({
  219.          *   @ORM\JoinColumn(name="customer_status_id", referencedColumnName="id")
  220.          * })
  221.          */
  222.         private $Status;
  223.         /**
  224.          * @var \Eccube\Entity\Master\Sex
  225.          *
  226.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex")
  227.          * @ORM\JoinColumns({
  228.          *   @ORM\JoinColumn(name="sex_id", referencedColumnName="id")
  229.          * })
  230.          */
  231.         private $Sex;
  232.         /**
  233.          * @var \Eccube\Entity\Master\Job
  234.          *
  235.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job")
  236.          * @ORM\JoinColumns({
  237.          *   @ORM\JoinColumn(name="job_id", referencedColumnName="id")
  238.          * })
  239.          */
  240.         private $Job;
  241.         /**
  242.          * @var \Eccube\Entity\Master\Country
  243.          *
  244.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country")
  245.          * @ORM\JoinColumns({
  246.          *   @ORM\JoinColumn(name="country_id", referencedColumnName="id")
  247.          * })
  248.          */
  249.         private $Country;
  250.         /**
  251.          * @var \Eccube\Entity\Master\Pref
  252.          *
  253.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref")
  254.          * @ORM\JoinColumns({
  255.          *   @ORM\JoinColumn(name="pref_id", referencedColumnName="id")
  256.          * })
  257.          */
  258.         private $Pref;
  259.         /**
  260.          * Constructor
  261.          */
  262.         public function __construct()
  263.         {
  264.             $this->CustomerFavoriteProducts = new \Doctrine\Common\Collections\ArrayCollection();
  265.             $this->CustomerAddresses = new \Doctrine\Common\Collections\ArrayCollection();
  266.             $this->Orders = new \Doctrine\Common\Collections\ArrayCollection();
  267.             $this->setBuyTimes(0);
  268.             $this->setBuyTotal(0);
  269.         }
  270.         /**
  271.          * @return string
  272.          */
  273.         public function __toString()
  274.         {
  275.             return (string) ($this->getName01().' '.$this->getName02());
  276.         }
  277.         /**
  278.          * {@inheritdoc}
  279.          */
  280.         public function getRoles()
  281.         {
  282.             return ['ROLE_USER'];
  283.         }
  284.         /**
  285.          * {@inheritdoc}
  286.          */
  287.         public function getUsername()
  288.         {
  289.             return $this->email;
  290.         }
  291.         /**
  292.          * {@inheritdoc}
  293.          */
  294.         public function eraseCredentials()
  295.         {
  296.         }
  297.         // TODO: できればFormTypeで行いたい
  298.         public static function loadValidatorMetadata(ClassMetadata $metadata)
  299.         {
  300.             $metadata->addConstraint(new UniqueEntity([
  301.                 'fields' => 'email',
  302.                 'message' => 'form_error.customer_already_exists',
  303.                 'repositoryMethod' => 'getNonWithdrawingCustomers',
  304.             ]));
  305.         }
  306.         /**
  307.          * Get id.
  308.          *
  309.          * @return int
  310.          */
  311.         public function getId()
  312.         {
  313.             return $this->id;
  314.         }
  315.         /**
  316.          * Set name01.
  317.          *
  318.          * @param string $name01
  319.          *
  320.          * @return Customer
  321.          */
  322.         public function setName01($name01)
  323.         {
  324.             $this->name01 $name01;
  325.             return $this;
  326.         }
  327.         /**
  328.          * Get name01.
  329.          *
  330.          * @return string
  331.          */
  332.         public function getName01()
  333.         {
  334.             return $this->name01;
  335.         }
  336.         /**
  337.          * Set name02.
  338.          *
  339.          * @param string $name02
  340.          *
  341.          * @return Customer
  342.          */
  343.         public function setName02($name02)
  344.         {
  345.             $this->name02 $name02;
  346.             return $this;
  347.         }
  348.         /**
  349.          * Get name02.
  350.          *
  351.          * @return string
  352.          */
  353.         public function getName02()
  354.         {
  355.             return $this->name02;
  356.         }
  357.         /**
  358.          * Set kana01.
  359.          *
  360.          * @param string|null $kana01
  361.          *
  362.          * @return Customer
  363.          */
  364.         public function setKana01($kana01 null)
  365.         {
  366.             $this->kana01 $kana01;
  367.             return $this;
  368.         }
  369.         /**
  370.          * Get kana01.
  371.          *
  372.          * @return string|null
  373.          */
  374.         public function getKana01()
  375.         {
  376.             return $this->kana01;
  377.         }
  378.         /**
  379.          * Set kana02.
  380.          *
  381.          * @param string|null $kana02
  382.          *
  383.          * @return Customer
  384.          */
  385.         public function setKana02($kana02 null)
  386.         {
  387.             $this->kana02 $kana02;
  388.             return $this;
  389.         }
  390.         /**
  391.          * Get kana02.
  392.          *
  393.          * @return string|null
  394.          */
  395.         public function getKana02()
  396.         {
  397.             return $this->kana02;
  398.         }
  399.         /**
  400.          * Set companyName.
  401.          *
  402.          * @param string|null $companyName
  403.          *
  404.          * @return Customer
  405.          */
  406.         public function setCompanyName($companyName null)
  407.         {
  408.             $this->company_name $companyName;
  409.             return $this;
  410.         }
  411.         /**
  412.          * Get companyName.
  413.          *
  414.          * @return string|null
  415.          */
  416.         public function getCompanyName()
  417.         {
  418.             return $this->company_name;
  419.         }
  420.         /**
  421.          * Set postal_code.
  422.          *
  423.          * @param string|null $postal_code
  424.          *
  425.          * @return Customer
  426.          */
  427.         public function setPostalCode($postal_code null)
  428.         {
  429.             $this->postal_code $postal_code;
  430.             return $this;
  431.         }
  432.         /**
  433.          * Get postal_code.
  434.          *
  435.          * @return string|null
  436.          */
  437.         public function getPostalCode()
  438.         {
  439.             return $this->postal_code;
  440.         }
  441.         /**
  442.          * Set addr01.
  443.          *
  444.          * @param string|null $addr01
  445.          *
  446.          * @return Customer
  447.          */
  448.         public function setAddr01($addr01 null)
  449.         {
  450.             $this->addr01 $addr01;
  451.             return $this;
  452.         }
  453.         /**
  454.          * Get addr01.
  455.          *
  456.          * @return string|null
  457.          */
  458.         public function getAddr01()
  459.         {
  460.             return $this->addr01;
  461.         }
  462.         /**
  463.          * Set addr02.
  464.          *
  465.          * @param string|null $addr02
  466.          *
  467.          * @return Customer
  468.          */
  469.         public function setAddr02($addr02 null)
  470.         {
  471.             $this->addr02 $addr02;
  472.             return $this;
  473.         }
  474.         /**
  475.          * Get addr02.
  476.          *
  477.          * @return string|null
  478.          */
  479.         public function getAddr02()
  480.         {
  481.             return $this->addr02;
  482.         }
  483.         /**
  484.          * Set email.
  485.          *
  486.          * @param string $email
  487.          *
  488.          * @return Customer
  489.          */
  490.         public function setEmail($email)
  491.         {
  492.             $this->email $email;
  493.             return $this;
  494.         }
  495.         /**
  496.          * Get email.
  497.          *
  498.          * @return string
  499.          */
  500.         public function getEmail()
  501.         {
  502.             return $this->email;
  503.         }
  504.         /**
  505.          * Set phone_number.
  506.          *
  507.          * @param string|null $phone_number
  508.          *
  509.          * @return Customer
  510.          */
  511.         public function setPhoneNumber($phone_number null)
  512.         {
  513.             $this->phone_number $phone_number;
  514.             return $this;
  515.         }
  516.         /**
  517.          * Get phone_number.
  518.          *
  519.          * @return string|null
  520.          */
  521.         public function getPhoneNumber()
  522.         {
  523.             return $this->phone_number;
  524.         }
  525.         /**
  526.          * Set birth.
  527.          *
  528.          * @param \DateTime|null $birth
  529.          *
  530.          * @return Customer
  531.          */
  532.         public function setBirth($birth null)
  533.         {
  534.             $this->birth $birth;
  535.             return $this;
  536.         }
  537.         /**
  538.          * Get birth.
  539.          *
  540.          * @return \DateTime|null
  541.          */
  542.         public function getBirth()
  543.         {
  544.             return $this->birth;
  545.         }
  546.         /**
  547.          * @param string|null $password
  548.          *
  549.          * @return $this
  550.          */
  551.         public function setPlainPassword(?string $password): self
  552.         {
  553.             $this->plain_password $password;
  554.             return $this;
  555.         }
  556.         /**
  557.          * @return string|null
  558.          */
  559.         public function getPlainPassword(): ?string
  560.         {
  561.             return $this->plain_password;
  562.         }
  563.         /**
  564.          * Set password.
  565.          *
  566.          * @param string|null $password
  567.          *
  568.          * @return Customer
  569.          */
  570.         public function setPassword($password null)
  571.         {
  572.             $this->password $password;
  573.             return $this;
  574.         }
  575.         /**
  576.          * Get password.
  577.          *
  578.          * @return string|null
  579.          */
  580.         public function getPassword()
  581.         {
  582.             return $this->password;
  583.         }
  584.         /**
  585.          * Set salt.
  586.          *
  587.          * @param string|null $salt
  588.          *
  589.          * @return Customer
  590.          */
  591.         public function setSalt($salt null)
  592.         {
  593.             $this->salt $salt;
  594.             return $this;
  595.         }
  596.         /**
  597.          * Get salt.
  598.          *
  599.          * @return string|null
  600.          */
  601.         public function getSalt()
  602.         {
  603.             return $this->salt;
  604.         }
  605.         /**
  606.          * Set secretKey.
  607.          *
  608.          * @param string $secretKey
  609.          *
  610.          * @return Customer
  611.          */
  612.         public function setSecretKey($secretKey)
  613.         {
  614.             $this->secret_key $secretKey;
  615.             return $this;
  616.         }
  617.         /**
  618.          * Get secretKey.
  619.          *
  620.          * @return string
  621.          */
  622.         public function getSecretKey()
  623.         {
  624.             return $this->secret_key;
  625.         }
  626.         /**
  627.          * Set firstBuyDate.
  628.          *
  629.          * @param \DateTime|null $firstBuyDate
  630.          *
  631.          * @return Customer
  632.          */
  633.         public function setFirstBuyDate($firstBuyDate null)
  634.         {
  635.             $this->first_buy_date $firstBuyDate;
  636.             return $this;
  637.         }
  638.         /**
  639.          * Get firstBuyDate.
  640.          *
  641.          * @return \DateTime|null
  642.          */
  643.         public function getFirstBuyDate()
  644.         {
  645.             return $this->first_buy_date;
  646.         }
  647.         /**
  648.          * Set lastBuyDate.
  649.          *
  650.          * @param \DateTime|null $lastBuyDate
  651.          *
  652.          * @return Customer
  653.          */
  654.         public function setLastBuyDate($lastBuyDate null)
  655.         {
  656.             $this->last_buy_date $lastBuyDate;
  657.             return $this;
  658.         }
  659.         /**
  660.          * Get lastBuyDate.
  661.          *
  662.          * @return \DateTime|null
  663.          */
  664.         public function getLastBuyDate()
  665.         {
  666.             return $this->last_buy_date;
  667.         }
  668.         /**
  669.          * Set buyTimes.
  670.          *
  671.          * @param string|null $buyTimes
  672.          *
  673.          * @return Customer
  674.          */
  675.         public function setBuyTimes($buyTimes null)
  676.         {
  677.             $this->buy_times $buyTimes;
  678.             return $this;
  679.         }
  680.         /**
  681.          * Get buyTimes.
  682.          *
  683.          * @return string|null
  684.          */
  685.         public function getBuyTimes()
  686.         {
  687.             return $this->buy_times;
  688.         }
  689.         /**
  690.          * Set buyTotal.
  691.          *
  692.          * @param string|null $buyTotal
  693.          *
  694.          * @return Customer
  695.          */
  696.         public function setBuyTotal($buyTotal null)
  697.         {
  698.             $this->buy_total $buyTotal;
  699.             return $this;
  700.         }
  701.         /**
  702.          * Get buyTotal.
  703.          *
  704.          * @return string|null
  705.          */
  706.         public function getBuyTotal()
  707.         {
  708.             return $this->buy_total;
  709.         }
  710.         /**
  711.          * Set note.
  712.          *
  713.          * @param string|null $note
  714.          *
  715.          * @return Customer
  716.          */
  717.         public function setNote($note null)
  718.         {
  719.             $this->note $note;
  720.             return $this;
  721.         }
  722.         /**
  723.          * Get note.
  724.          *
  725.          * @return string|null
  726.          */
  727.         public function getNote()
  728.         {
  729.             return $this->note;
  730.         }
  731.         /**
  732.          * Set resetKey.
  733.          *
  734.          * @param string|null $resetKey
  735.          *
  736.          * @return Customer
  737.          */
  738.         public function setResetKey($resetKey null)
  739.         {
  740.             $this->reset_key $resetKey;
  741.             return $this;
  742.         }
  743.         /**
  744.          * Get resetKey.
  745.          *
  746.          * @return string|null
  747.          */
  748.         public function getResetKey()
  749.         {
  750.             return $this->reset_key;
  751.         }
  752.         /**
  753.          * Set resetExpire.
  754.          *
  755.          * @param \DateTime|null $resetExpire
  756.          *
  757.          * @return Customer
  758.          */
  759.         public function setResetExpire($resetExpire null)
  760.         {
  761.             $this->reset_expire $resetExpire;
  762.             return $this;
  763.         }
  764.         /**
  765.          * Get resetExpire.
  766.          *
  767.          * @return \DateTime|null
  768.          */
  769.         public function getResetExpire()
  770.         {
  771.             return $this->reset_expire;
  772.         }
  773.         /**
  774.          * Set createDate.
  775.          *
  776.          * @param \DateTime $createDate
  777.          *
  778.          * @return Customer
  779.          */
  780.         public function setCreateDate($createDate)
  781.         {
  782.             $this->create_date $createDate;
  783.             return $this;
  784.         }
  785.         /**
  786.          * Get createDate.
  787.          *
  788.          * @return \DateTime
  789.          */
  790.         public function getCreateDate()
  791.         {
  792.             return $this->create_date;
  793.         }
  794.         /**
  795.          * Set updateDate.
  796.          *
  797.          * @param \DateTime $updateDate
  798.          *
  799.          * @return Customer
  800.          */
  801.         public function setUpdateDate($updateDate)
  802.         {
  803.             $this->update_date $updateDate;
  804.             return $this;
  805.         }
  806.         /**
  807.          * Get updateDate.
  808.          *
  809.          * @return \DateTime
  810.          */
  811.         public function getUpdateDate()
  812.         {
  813.             return $this->update_date;
  814.         }
  815.         /**
  816.          * Add customerFavoriteProduct.
  817.          *
  818.          * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
  819.          *
  820.          * @return Customer
  821.          */
  822.         public function addCustomerFavoriteProduct(CustomerFavoriteProduct $customerFavoriteProduct)
  823.         {
  824.             $this->CustomerFavoriteProducts[] = $customerFavoriteProduct;
  825.             return $this;
  826.         }
  827.         /**
  828.          * Remove customerFavoriteProduct.
  829.          *
  830.          * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
  831.          *
  832.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  833.          */
  834.         public function removeCustomerFavoriteProduct(CustomerFavoriteProduct $customerFavoriteProduct)
  835.         {
  836.             return $this->CustomerFavoriteProducts->removeElement($customerFavoriteProduct);
  837.         }
  838.         /**
  839.          * Get customerFavoriteProducts.
  840.          *
  841.          * @return \Doctrine\Common\Collections\Collection
  842.          */
  843.         public function getCustomerFavoriteProducts()
  844.         {
  845.             return $this->CustomerFavoriteProducts;
  846.         }
  847.         /**
  848.          * Add customerAddress.
  849.          *
  850.          * @param \Eccube\Entity\CustomerAddress $customerAddress
  851.          *
  852.          * @return Customer
  853.          */
  854.         public function addCustomerAddress(CustomerAddress $customerAddress)
  855.         {
  856.             $this->CustomerAddresses[] = $customerAddress;
  857.             return $this;
  858.         }
  859.         /**
  860.          * Remove customerAddress.
  861.          *
  862.          * @param \Eccube\Entity\CustomerAddress $customerAddress
  863.          *
  864.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  865.          */
  866.         public function removeCustomerAddress(CustomerAddress $customerAddress)
  867.         {
  868.             return $this->CustomerAddresses->removeElement($customerAddress);
  869.         }
  870.         /**
  871.          * Get customerAddresses.
  872.          *
  873.          * @return \Doctrine\Common\Collections\Collection
  874.          */
  875.         public function getCustomerAddresses()
  876.         {
  877.             return $this->CustomerAddresses;
  878.         }
  879.         /**
  880.          * Add order.
  881.          *
  882.          * @param \Eccube\Entity\Order $order
  883.          *
  884.          * @return Customer
  885.          */
  886.         public function addOrder(Order $order)
  887.         {
  888.             $this->Orders[] = $order;
  889.             return $this;
  890.         }
  891.         /**
  892.          * Remove order.
  893.          *
  894.          * @param \Eccube\Entity\Order $order
  895.          *
  896.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  897.          */
  898.         public function removeOrder(Order $order)
  899.         {
  900.             return $this->Orders->removeElement($order);
  901.         }
  902.         /**
  903.          * Get orders.
  904.          *
  905.          * @return \Doctrine\Common\Collections\Collection
  906.          */
  907.         public function getOrders()
  908.         {
  909.             return $this->Orders;
  910.         }
  911.         /**
  912.          * Set status.
  913.          *
  914.          * @param \Eccube\Entity\Master\CustomerStatus|null $status
  915.          *
  916.          * @return Customer
  917.          */
  918.         public function setStatus(Master\CustomerStatus $status null)
  919.         {
  920.             $this->Status $status;
  921.             return $this;
  922.         }
  923.         /**
  924.          * Get status.
  925.          *
  926.          * @return \Eccube\Entity\Master\CustomerStatus|null
  927.          */
  928.         public function getStatus()
  929.         {
  930.             return $this->Status;
  931.         }
  932.         /**
  933.          * Set sex.
  934.          *
  935.          * @param \Eccube\Entity\Master\Sex|null $sex
  936.          *
  937.          * @return Customer
  938.          */
  939.         public function setSex(Master\Sex $sex null)
  940.         {
  941.             $this->Sex $sex;
  942.             return $this;
  943.         }
  944.         /**
  945.          * Get sex.
  946.          *
  947.          * @return \Eccube\Entity\Master\Sex|null
  948.          */
  949.         public function getSex()
  950.         {
  951.             return $this->Sex;
  952.         }
  953.         /**
  954.          * Set job.
  955.          *
  956.          * @param \Eccube\Entity\Master\Job|null $job
  957.          *
  958.          * @return Customer
  959.          */
  960.         public function setJob(Master\Job $job null)
  961.         {
  962.             $this->Job $job;
  963.             return $this;
  964.         }
  965.         /**
  966.          * Get job.
  967.          *
  968.          * @return \Eccube\Entity\Master\Job|null
  969.          */
  970.         public function getJob()
  971.         {
  972.             return $this->Job;
  973.         }
  974.         /**
  975.          * Set country.
  976.          *
  977.          * @param \Eccube\Entity\Master\Country|null $country
  978.          *
  979.          * @return Customer
  980.          */
  981.         public function setCountry(Master\Country $country null)
  982.         {
  983.             $this->Country $country;
  984.             return $this;
  985.         }
  986.         /**
  987.          * Get country.
  988.          *
  989.          * @return \Eccube\Entity\Master\Country|null
  990.          */
  991.         public function getCountry()
  992.         {
  993.             return $this->Country;
  994.         }
  995.         /**
  996.          * Set pref.
  997.          *
  998.          * @param \Eccube\Entity\Master\Pref|null $pref
  999.          *
  1000.          * @return Customer
  1001.          */
  1002.         public function setPref(Master\Pref $pref null)
  1003.         {
  1004.             $this->Pref $pref;
  1005.             return $this;
  1006.         }
  1007.         /**
  1008.          * Get pref.
  1009.          *
  1010.          * @return \Eccube\Entity\Master\Pref|null
  1011.          */
  1012.         public function getPref()
  1013.         {
  1014.             return $this->Pref;
  1015.         }
  1016.         /**
  1017.          * Set point
  1018.          *
  1019.          * @param string $point
  1020.          *
  1021.          * @return Customer
  1022.          */
  1023.         public function setPoint($point)
  1024.         {
  1025.             $this->point $point;
  1026.             return $this;
  1027.         }
  1028.         /**
  1029.          * Get point
  1030.          *
  1031.          * @return string
  1032.          */
  1033.         public function getPoint()
  1034.         {
  1035.             return $this->point;
  1036.         }
  1037.         /**
  1038.          * Set pointwbike
  1039.          *
  1040.          * @param string $pointwbike
  1041.          *
  1042.          * @return Customer
  1043.          */
  1044.         public function setPointwbike($pointwbike)
  1045.         {
  1046.             $this->pointwbike $pointwbike;
  1047.             return $this;
  1048.         }
  1049.         /**
  1050.          * Get pointwbike
  1051.          *
  1052.          * @return string
  1053.          */
  1054.         public function getPointwbike()
  1055.         {
  1056.             return $this->pointwbike;
  1057.         }
  1058.         /**
  1059.          * String representation of object
  1060.          *
  1061.          * @see http://php.net/manual/en/serializable.serialize.php
  1062.          *
  1063.          * @return string the string representation of the object or null
  1064.          *
  1065.          * @since 5.1.0
  1066.          */
  1067.         public function serialize()
  1068.         {
  1069.             // see https://symfony.com/doc/2.7/security/entity_provider.html#create-your-user-entity
  1070.             // CustomerRepository::loadUserByUsername() で Status をチェックしているため、ここでは不要
  1071.             return serialize([
  1072.                 $this->id,
  1073.                 $this->email,
  1074.                 $this->password,
  1075.                 $this->salt,
  1076.             ]);
  1077.         }
  1078.         /**
  1079.          * Constructs the object
  1080.          *
  1081.          * @see http://php.net/manual/en/serializable.unserialize.php
  1082.          *
  1083.          * @param string $serialized <p>
  1084.          * The string representation of the object.
  1085.          * </p>
  1086.          *
  1087.          * @return void
  1088.          *
  1089.          * @since 5.1.0
  1090.          */
  1091.         public function unserialize($serialized)
  1092.         {
  1093.             list(
  1094.                 $this->id,
  1095.                 $this->email,
  1096.                 $this->password,
  1097.                 $this->salt) = unserialize($serialized);
  1098.         }
  1099.     }