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