Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
49:41 queued 37:58
created

Customer::getCreateDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Entity;
15
16
use Doctrine\ORM\Mapping as ORM;
17
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
18
use Symfony\Component\Security\Core\User\UserInterface;
19
use Symfony\Component\Validator\Mapping\ClassMetadata;
20
21
/**
22
 * Customer
23
 *
24
 * @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"})})
25
 * @ORM\InheritanceType("SINGLE_TABLE")
26
 * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
27
 * @ORM\HasLifecycleCallbacks()
28
 * @ORM\Entity(repositoryClass="Eccube\Repository\CustomerRepository")
29
 */
30
class Customer extends \Eccube\Entity\AbstractEntity implements UserInterface
31
{
32
    /**
33
     * @var int
34
     *
35
     * @ORM\Column(name="id", type="integer", options={"unsigned":true})
36
     * @ORM\Id
37
     * @ORM\GeneratedValue(strategy="IDENTITY")
38
     */
39
    private $id;
40
41
    /**
42
     * @var string
43
     *
44
     * @ORM\Column(name="name01", type="string", length=255)
45
     */
46
    private $name01;
47
48
    /**
49
     * @var string
50
     *
51
     * @ORM\Column(name="name02", type="string", length=255)
52
     */
53
    private $name02;
54
55
    /**
56
     * @var string|null
57
     *
58
     * @ORM\Column(name="kana01", type="string", length=255, nullable=true)
59
     */
60
    private $kana01;
61
62
    /**
63
     * @var string|null
64
     *
65
     * @ORM\Column(name="kana02", type="string", length=255, nullable=true)
66
     */
67
    private $kana02;
68
69
    /**
70
     * @var string|null
71
     *
72
     * @ORM\Column(name="company_name", type="string", length=255, nullable=true)
73
     */
74
    private $company_name;
75
76
    /**
77
     * @var string|null
78
     *
79
     * @ORM\Column(name="zip01", type="string", length=3, nullable=true)
80
     */
81
    private $zip01;
82
83
    /**
84
     * @var string|null
85
     *
86
     * @ORM\Column(name="zip02", type="string", length=4, nullable=true)
87
     */
88
    private $zip02;
89
90
    /**
91
     * @var string|null
92
     *
93
     * @ORM\Column(name="zipcode", type="string", length=7, nullable=true)
94
     */
95
    private $zipcode;
96
97
    /**
98
     * @var string|null
99
     *
100
     * @ORM\Column(name="addr01", type="string", length=255, nullable=true)
101
     */
102
    private $addr01;
103
104
    /**
105
     * @var string|null
106
     *
107
     * @ORM\Column(name="addr02", type="string", length=255, nullable=true)
108
     */
109
    private $addr02;
110
111
    /**
112
     * @var string
113
     *
114
     * @ORM\Column(name="email", type="string", length=255)
115
     */
116
    private $email;
117
118
    /**
119
     * @var string|null
120
     *
121
     * @ORM\Column(name="tel01", type="string", length=5, nullable=true)
122
     */
123
    private $tel01;
124
125
    /**
126
     * @var string|null
127
     *
128
     * @ORM\Column(name="tel02", type="string", length=4, nullable=true)
129
     */
130
    private $tel02;
131
132
    /**
133
     * @var string|null
134
     *
135
     * @ORM\Column(name="tel03", type="string", length=4, nullable=true)
136
     */
137
    private $tel03;
138
139
    /**
140
     * @var string|null
141
     *
142
     * @ORM\Column(name="fax01", type="string", length=5, nullable=true)
143
     */
144
    private $fax01;
145
146
    /**
147
     * @var string|null
148
     *
149
     * @ORM\Column(name="fax02", type="string", length=4, nullable=true)
150
     */
151
    private $fax02;
152
153
    /**
154
     * @var string|null
155
     *
156
     * @ORM\Column(name="fax03", type="string", length=4, nullable=true)
157
     */
158
    private $fax03;
159
160
    /**
161
     * @var \DateTime|null
162
     *
163
     * @ORM\Column(name="birth", type="datetimetz", nullable=true)
164
     */
165
    private $birth;
166
167
    /**
168
     * @var string|null
169
     *
170
     * @ORM\Column(name="password", type="string", length=255, nullable=true)
171
     */
172
    private $password;
173
174
    /**
175
     * @var string|null
176
     *
177
     * @ORM\Column(name="salt", type="string", length=255, nullable=true)
178
     */
179
    private $salt;
180
181
    /**
182
     * @var string
183
     *
184
     * @ORM\Column(name="secret_key", type="string", length=255)
185
     */
186
    private $secret_key;
187
188
    /**
189
     * @var \DateTime|null
190
     *
191
     * @ORM\Column(name="first_buy_date", type="datetimetz", nullable=true)
192
     */
193
    private $first_buy_date;
194
195
    /**
196
     * @var \DateTime|null
197
     *
198
     * @ORM\Column(name="last_buy_date", type="datetimetz", nullable=true)
199
     */
200
    private $last_buy_date;
201
202
    /**
203
     * @var string|null
204
     *
205
     * @ORM\Column(name="buy_times", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true,"default":0})
206
     */
207
    private $buy_times = 0;
208
209
    /**
210
     * @var string|null
211
     *
212
     * @ORM\Column(name="buy_total", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true,"default":0})
213
     */
214
    private $buy_total = 0;
215
216
    /**
217
     * @var string|null
218
     *
219
     * @ORM\Column(name="note", type="string", length=4000, nullable=true)
220
     */
221
    private $note;
222
223
    /**
224
     * @var string|null
225
     *
226
     * @ORM\Column(name="reset_key", type="string", length=255, nullable=true)
227
     */
228
    private $reset_key;
229
230
    /**
231
     * @var \DateTime|null
232
     *
233
     * @ORM\Column(name="reset_expire", type="datetimetz", nullable=true)
234
     */
235
    private $reset_expire;
236
237
    /**
238
     * @var string
239
     *
240
     * @ORM\Column(name="point", type="decimal", precision=12, scale=0, options={"unsigned":false,"default":0})
241
     */
242
    private $point = '0';
243
244
    /**
245
     * @var \DateTime
246
     *
247
     * @ORM\Column(name="create_date", type="datetimetz")
248
     */
249
    private $create_date;
250
251
    /**
252
     * @var \DateTime
253
     *
254
     * @ORM\Column(name="update_date", type="datetimetz")
255
     */
256
    private $update_date;
257
258
    /**
259
     * @var \Doctrine\Common\Collections\Collection
260
     *
261
     * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerFavoriteProduct", mappedBy="Customer", cascade={"remove"})
262
     */
263
    private $CustomerFavoriteProducts;
264
265
    /**
266
     * @var \Doctrine\Common\Collections\Collection
267
     *
268
     * @ORM\OneToMany(targetEntity="Eccube\Entity\CustomerAddress", mappedBy="Customer", cascade={"remove"})
269
     * @ORM\OrderBy({
270
     *     "id"="ASC"
271
     * })
272
     */
273
    private $CustomerAddresses;
274
275
    /**
276
     * @var \Doctrine\Common\Collections\Collection
277
     *
278
     * @ORM\OneToMany(targetEntity="Eccube\Entity\Order", mappedBy="Customer")
279
     */
280
    private $Orders;
281
282
    /**
283
     * @var \Eccube\Entity\Master\CustomerStatus
284
     *
285
     * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\CustomerStatus")
286
     * @ORM\JoinColumns({
287
     *   @ORM\JoinColumn(name="customer_status_id", referencedColumnName="id")
288
     * })
289
     */
290
    private $Status;
291
292
    /**
293
     * @var \Eccube\Entity\Master\Sex
294
     *
295
     * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Sex")
296
     * @ORM\JoinColumns({
297
     *   @ORM\JoinColumn(name="sex_id", referencedColumnName="id")
298
     * })
299
     */
300
    private $Sex;
301
302
    /**
303
     * @var \Eccube\Entity\Master\Job
304
     *
305
     * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Job")
306
     * @ORM\JoinColumns({
307
     *   @ORM\JoinColumn(name="job_id", referencedColumnName="id")
308
     * })
309
     */
310
    private $Job;
311
312
    /**
313
     * @var \Eccube\Entity\Master\Country
314
     *
315
     * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country")
316
     * @ORM\JoinColumns({
317
     *   @ORM\JoinColumn(name="country_id", referencedColumnName="id")
318
     * })
319
     */
320
    private $Country;
321
322
    /**
323
     * @var \Eccube\Entity\Master\Pref
324
     *
325
     * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref")
326
     * @ORM\JoinColumns({
327
     *   @ORM\JoinColumn(name="pref_id", referencedColumnName="id")
328
     * })
329
     */
330
    private $Pref;
331
332
    /**
333
     * Constructor
334
     */
335 343
    public function __construct()
336
    {
337 343
        $this->CustomerFavoriteProducts = new \Doctrine\Common\Collections\ArrayCollection();
338 343
        $this->CustomerAddresses = new \Doctrine\Common\Collections\ArrayCollection();
339 343
        $this->Orders = new \Doctrine\Common\Collections\ArrayCollection();
340
341 343
        $this->setBuyTimes(0);
342 343
        $this->setBuyTotal(0);
343
    }
344
345
    /**
346
     * @return string
347
     */
348
    public function __toString()
349
    {
350
        return (string) ($this->getName01().' '.$this->getName02());
351
    }
352
353
    /**
354
     * {@inheritdoc}
355
     */
356 2
    public function getRoles()
357
    {
358 2
        return ['ROLE_USER'];
359
    }
360
361
    /**
362
     * {@inheritdoc}
363
     */
364 76
    public function getUsername()
365
    {
366 76
        return $this->email;
367
    }
368
369
    /**
370
     * {@inheritdoc}
371
     */
372
    public function eraseCredentials()
373
    {
374
    }
375
376
    // TODO: できればFormTypeで行いたい
377 49
    public static function loadValidatorMetadata(ClassMetadata $metadata)
378
    {
379 49
        $metadata->addConstraint(new UniqueEntity([
380 49
            'fields' => 'email',
381
            'message' => 'customer.text.error.email_registered',
382
            'repositoryMethod' => 'getNonWithdrawingCustomers',
383
        ]));
384
    }
385
386
    /**
387
     * Get id.
388
     *
389
     * @return int
390
     */
391 124
    public function getId()
392
    {
393 124
        return $this->id;
394
    }
395
396
    /**
397
     * Set name01.
398
     *
399
     * @param string $name01
400
     *
401
     * @return Customer
402
     */
403 339
    public function setName01($name01)
404
    {
405 339
        $this->name01 = $name01;
406
407 339
        return $this;
408
    }
409
410
    /**
411
     * Get name01.
412
     *
413
     * @return string
414
     */
415 140
    public function getName01()
416
    {
417 140
        return $this->name01;
418
    }
419
420
    /**
421
     * Set name02.
422
     *
423
     * @param string $name02
424
     *
425
     * @return Customer
426
     */
427 339
    public function setName02($name02)
428
    {
429 339
        $this->name02 = $name02;
430
431 339
        return $this;
432
    }
433
434
    /**
435
     * Get name02.
436
     *
437
     * @return string
438
     */
439 137
    public function getName02()
440
    {
441 137
        return $this->name02;
442
    }
443
444
    /**
445
     * Set kana01.
446
     *
447
     * @param string|null $kana01
448
     *
449
     * @return Customer
450
     */
451 339
    public function setKana01($kana01 = null)
452
    {
453 339
        $this->kana01 = $kana01;
454
455 339
        return $this;
456
    }
457
458
    /**
459
     * Get kana01.
460
     *
461
     * @return string|null
462
     */
463 114
    public function getKana01()
464
    {
465 114
        return $this->kana01;
466
    }
467
468
    /**
469
     * Set kana02.
470
     *
471
     * @param string|null $kana02
472
     *
473
     * @return Customer
474
     */
475 339
    public function setKana02($kana02 = null)
476
    {
477 339
        $this->kana02 = $kana02;
478
479 339
        return $this;
480
    }
481
482
    /**
483
     * Get kana02.
484
     *
485
     * @return string|null
486
     */
487 115
    public function getKana02()
488
    {
489 115
        return $this->kana02;
490
    }
491
492
    /**
493
     * Set companyName.
494
     *
495
     * @param string|null $companyName
496
     *
497
     * @return Customer
498
     */
499 324
    public function setCompanyName($companyName = null)
500
    {
501 324
        $this->company_name = $companyName;
502
503 324
        return $this;
504
    }
505
506
    /**
507
     * Get companyName.
508
     *
509
     * @return string|null
510
     */
511 109
    public function getCompanyName()
512
    {
513 109
        return $this->company_name;
514
    }
515
516
    /**
517
     * Set zip01.
518
     *
519
     * @param string|null $zip01
520
     *
521
     * @return Customer
522
     */
523 339
    public function setZip01($zip01 = null)
524
    {
525 339
        $this->zip01 = $zip01;
526
527 339
        return $this;
528
    }
529
530
    /**
531
     * Get zip01.
532
     *
533
     * @return string|null
534
     */
535 110
    public function getZip01()
536
    {
537 110
        return $this->zip01;
538
    }
539
540
    /**
541
     * Set zip02.
542
     *
543
     * @param string|null $zip02
544
     *
545
     * @return Customer
546
     */
547 339
    public function setZip02($zip02 = null)
548
    {
549 339
        $this->zip02 = $zip02;
550
551 339
        return $this;
552
    }
553
554
    /**
555
     * Get zip02.
556
     *
557
     * @return string|null
558
     */
559 110
    public function getZip02()
560
    {
561 110
        return $this->zip02;
562
    }
563
564
    /**
565
     * Set zipcode.
566
     *
567
     * @param string|null $zipcode
568
     *
569
     * @return Customer
570
     */
571 297
    public function setZipcode($zipcode = null)
572
    {
573 297
        $this->zipcode = $zipcode;
574
575 297
        return $this;
576
    }
577
578
    /**
579
     * Get zipcode.
580
     *
581
     * @return string|null
582
     */
583
    public function getZipcode()
584
    {
585
        return $this->zipcode;
586
    }
587
588
    /**
589
     * Set addr01.
590
     *
591
     * @param string|null $addr01
592
     *
593
     * @return Customer
594
     */
595 339
    public function setAddr01($addr01 = null)
596
    {
597 339
        $this->addr01 = $addr01;
598
599 339
        return $this;
600
    }
601
602
    /**
603
     * Get addr01.
604
     *
605
     * @return string|null
606
     */
607 110
    public function getAddr01()
608
    {
609 110
        return $this->addr01;
610
    }
611
612
    /**
613
     * Set addr02.
614
     *
615
     * @param string|null $addr02
616
     *
617
     * @return Customer
618
     */
619 339
    public function setAddr02($addr02 = null)
620
    {
621 339
        $this->addr02 = $addr02;
622
623 339
        return $this;
624
    }
625
626
    /**
627
     * Get addr02.
628
     *
629
     * @return string|null
630
     */
631 110
    public function getAddr02()
632
    {
633 110
        return $this->addr02;
634
    }
635
636
    /**
637
     * Set email.
638
     *
639
     * @param string $email
640
     *
641
     * @return Customer
642
     */
643 339
    public function setEmail($email)
644
    {
645 339
        $this->email = $email;
646
647 339
        return $this;
648
    }
649
650
    /**
651
     * Get email.
652
     *
653
     * @return string
654
     */
655 79
    public function getEmail()
656
    {
657 79
        return $this->email;
658
    }
659
660
    /**
661
     * Set tel01.
662
     *
663
     * @param string|null $tel01
664
     *
665
     * @return Customer
666
     */
667 339
    public function setTel01($tel01 = null)
668
    {
669 339
        $this->tel01 = $tel01;
670
671 339
        return $this;
672
    }
673
674
    /**
675
     * Get tel01.
676
     *
677
     * @return string|null
678
     */
679 119
    public function getTel01()
680
    {
681 119
        return $this->tel01;
682
    }
683
684
    /**
685
     * Set tel02.
686
     *
687
     * @param string|null $tel02
688
     *
689
     * @return Customer
690
     */
691 339
    public function setTel02($tel02 = null)
692
    {
693 339
        $this->tel02 = $tel02;
694
695 339
        return $this;
696
    }
697
698
    /**
699
     * Get tel02.
700
     *
701
     * @return string|null
702
     */
703 119
    public function getTel02()
704
    {
705 119
        return $this->tel02;
706
    }
707
708
    /**
709
     * Set tel03.
710
     *
711
     * @param string|null $tel03
712
     *
713
     * @return Customer
714
     */
715 339
    public function setTel03($tel03 = null)
716
    {
717 339
        $this->tel03 = $tel03;
718
719 339
        return $this;
720
    }
721
722
    /**
723
     * Get tel03.
724
     *
725
     * @return string|null
726
     */
727 119
    public function getTel03()
728
    {
729 119
        return $this->tel03;
730
    }
731
732
    /**
733
     * Set fax01.
734
     *
735
     * @param string|null $fax01
736
     *
737
     * @return Customer
738
     */
739 322
    public function setFax01($fax01 = null)
740
    {
741 322
        $this->fax01 = $fax01;
742
743 322
        return $this;
744
    }
745
746
    /**
747
     * Get fax01.
748
     *
749
     * @return string|null
750
     */
751 109
    public function getFax01()
752
    {
753 109
        return $this->fax01;
754
    }
755
756
    /**
757
     * Set fax02.
758
     *
759
     * @param string|null $fax02
760
     *
761
     * @return Customer
762
     */
763 322
    public function setFax02($fax02 = null)
764
    {
765 322
        $this->fax02 = $fax02;
766
767 322
        return $this;
768
    }
769
770
    /**
771
     * Get fax02.
772
     *
773
     * @return string|null
774
     */
775 109
    public function getFax02()
776
    {
777 109
        return $this->fax02;
778
    }
779
780
    /**
781
     * Set fax03.
782
     *
783
     * @param string|null $fax03
784
     *
785
     * @return Customer
786
     */
787 322
    public function setFax03($fax03 = null)
788
    {
789 322
        $this->fax03 = $fax03;
790
791 322
        return $this;
792
    }
793
794
    /**
795
     * Get fax03.
796
     *
797
     * @return string|null
798
     */
799 109
    public function getFax03()
800
    {
801 109
        return $this->fax03;
802
    }
803
804
    /**
805
     * Set birth.
806
     *
807
     * @param \DateTime|null $birth
808
     *
809
     * @return Customer
810
     */
811 325
    public function setBirth($birth = null)
812
    {
813 325
        $this->birth = $birth;
814
815 325
        return $this;
816
    }
817
818
    /**
819
     * Get birth.
820
     *
821
     * @return \DateTime|null
822
     */
823 62
    public function getBirth()
824
    {
825 62
        return $this->birth;
826
    }
827
828
    /**
829
     * Set password.
830
     *
831
     * @param string|null $password
832
     *
833
     * @return Customer
834
     */
835 321
    public function setPassword($password = null)
836
    {
837 321
        $this->password = $password;
838
839 321
        return $this;
840
    }
841
842
    /**
843
     * Get password.
844
     *
845
     * @return string|null
846
     */
847 125
    public function getPassword()
848
    {
849 125
        return $this->password;
850
    }
851
852
    /**
853
     * Set salt.
854
     *
855
     * @param string|null $salt
856
     *
857
     * @return Customer
858
     */
859 281
    public function setSalt($salt = null)
860
    {
861 281
        $this->salt = $salt;
862
863 281
        return $this;
864
    }
865
866
    /**
867
     * Get salt.
868
     *
869
     * @return string|null
870
     */
871 77
    public function getSalt()
872
    {
873 77
        return $this->salt;
874
    }
875
876
    /**
877
     * Set secretKey.
878
     *
879
     * @param string $secretKey
880
     *
881
     * @return Customer
882
     */
883 281
    public function setSecretKey($secretKey)
884
    {
885 281
        $this->secret_key = $secretKey;
886
887 281
        return $this;
888
    }
889
890
    /**
891
     * Get secretKey.
892
     *
893
     * @return string
894
     */
895 5
    public function getSecretKey()
896
    {
897 5
        return $this->secret_key;
898
    }
899
900
    /**
901
     * Set firstBuyDate.
902
     *
903
     * @param \DateTime|null $firstBuyDate
904
     *
905
     * @return Customer
906
     */
907 4
    public function setFirstBuyDate($firstBuyDate = null)
908
    {
909 4
        $this->first_buy_date = $firstBuyDate;
910
911 4
        return $this;
912
    }
913
914
    /**
915
     * Get firstBuyDate.
916
     *
917
     * @return \DateTime|null
918
     */
919 5
    public function getFirstBuyDate()
920
    {
921 5
        return $this->first_buy_date;
922
    }
923
924
    /**
925
     * Set lastBuyDate.
926
     *
927
     * @param \DateTime|null $lastBuyDate
928
     *
929
     * @return Customer
930
     */
931 6
    public function setLastBuyDate($lastBuyDate = null)
932
    {
933 6
        $this->last_buy_date = $lastBuyDate;
934
935 6
        return $this;
936
    }
937
938
    /**
939
     * Get lastBuyDate.
940
     *
941
     * @return \DateTime|null
942
     */
943 2
    public function getLastBuyDate()
944
    {
945 2
        return $this->last_buy_date;
946
    }
947
948
    /**
949
     * Set buyTimes.
950
     *
951
     * @param string|null $buyTimes
952
     *
953
     * @return Customer
954
     */
955 343
    public function setBuyTimes($buyTimes = null)
956
    {
957 343
        $this->buy_times = $buyTimes;
958
959 343
        return $this;
960
    }
961
962
    /**
963
     * Get buyTimes.
964
     *
965
     * @return string|null
966
     */
967 5
    public function getBuyTimes()
968
    {
969 5
        return $this->buy_times;
970
    }
971
972
    /**
973
     * Set buyTotal.
974
     *
975
     * @param string|null $buyTotal
976
     *
977
     * @return Customer
978
     */
979 343
    public function setBuyTotal($buyTotal = null)
980
    {
981 343
        $this->buy_total = $buyTotal;
982
983 343
        return $this;
984
    }
985
986
    /**
987
     * Get buyTotal.
988
     *
989
     * @return string|null
990
     */
991 3
    public function getBuyTotal()
992
    {
993 3
        return $this->buy_total;
994
    }
995
996
    /**
997
     * Set note.
998
     *
999
     * @param string|null $note
1000
     *
1001
     * @return Customer
1002
     */
1003 24
    public function setNote($note = null)
1004
    {
1005 24
        $this->note = $note;
1006
1007 24
        return $this;
1008
    }
1009
1010
    /**
1011
     * Get note.
1012
     *
1013
     * @return string|null
1014
     */
1015 32
    public function getNote()
1016
    {
1017 32
        return $this->note;
1018
    }
1019
1020
    /**
1021
     * Set resetKey.
1022
     *
1023
     * @param string|null $resetKey
1024
     *
1025
     * @return Customer
1026
     */
1027 2
    public function setResetKey($resetKey = null)
1028
    {
1029 2
        $this->reset_key = $resetKey;
1030
1031 2
        return $this;
1032
    }
1033
1034
    /**
1035
     * Get resetKey.
1036
     *
1037
     * @return string|null
1038
     */
1039
    public function getResetKey()
1040
    {
1041
        return $this->reset_key;
1042
    }
1043
1044
    /**
1045
     * Set resetExpire.
1046
     *
1047
     * @param \DateTime|null $resetExpire
1048
     *
1049
     * @return Customer
1050
     */
1051 2
    public function setResetExpire($resetExpire = null)
1052
    {
1053 2
        $this->reset_expire = $resetExpire;
1054
1055 2
        return $this;
1056
    }
1057
1058
    /**
1059
     * Get resetExpire.
1060
     *
1061
     * @return \DateTime|null
1062
     */
1063
    public function getResetExpire()
1064
    {
1065
        return $this->reset_expire;
1066
    }
1067
1068
    /**
1069
     * Set createDate.
1070
     *
1071
     * @param \DateTime $createDate
1072
     *
1073
     * @return Customer
1074
     */
1075 281
    public function setCreateDate($createDate)
1076
    {
1077 281
        $this->create_date = $createDate;
1078
1079 281
        return $this;
1080
    }
1081
1082
    /**
1083
     * Get createDate.
1084
     *
1085
     * @return \DateTime
1086
     */
1087 1
    public function getCreateDate()
1088
    {
1089 1
        return $this->create_date;
1090
    }
1091
1092
    /**
1093
     * Set updateDate.
1094
     *
1095
     * @param \DateTime $updateDate
1096
     *
1097
     * @return Customer
1098
     */
1099 281
    public function setUpdateDate($updateDate)
1100
    {
1101 281
        $this->update_date = $updateDate;
1102
1103 281
        return $this;
1104
    }
1105
1106
    /**
1107
     * Get updateDate.
1108
     *
1109
     * @return \DateTime
1110
     */
1111 1
    public function getUpdateDate()
1112
    {
1113 1
        return $this->update_date;
1114
    }
1115
1116
    /**
1117
     * Add customerFavoriteProduct.
1118
     *
1119
     * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
1120
     *
1121
     * @return Customer
1122
     */
1123
    public function addCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct)
1124
    {
1125
        $this->CustomerFavoriteProducts[] = $customerFavoriteProduct;
1126
1127
        return $this;
1128
    }
1129
1130
    /**
1131
     * Remove customerFavoriteProduct.
1132
     *
1133
     * @param \Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct
1134
     *
1135
     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
1136
     */
1137
    public function removeCustomerFavoriteProduct(\Eccube\Entity\CustomerFavoriteProduct $customerFavoriteProduct)
1138
    {
1139
        return $this->CustomerFavoriteProducts->removeElement($customerFavoriteProduct);
1140
    }
1141
1142
    /**
1143
     * Get customerFavoriteProducts.
1144
     *
1145
     * @return \Doctrine\Common\Collections\Collection
1146
     */
1147
    public function getCustomerFavoriteProducts()
1148
    {
1149
        return $this->CustomerFavoriteProducts;
1150
    }
1151
1152
    /**
1153
     * Add customerAddress.
1154
     *
1155
     * @param \Eccube\Entity\CustomerAddress $customerAddress
1156
     *
1157
     * @return Customer
1158
     */
1159 7
    public function addCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress)
1160
    {
1161 7
        $this->CustomerAddresses[] = $customerAddress;
1162
1163 7
        return $this;
1164
    }
1165
1166
    /**
1167
     * Remove customerAddress.
1168
     *
1169
     * @param \Eccube\Entity\CustomerAddress $customerAddress
1170
     *
1171
     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
1172
     */
1173
    public function removeCustomerAddress(\Eccube\Entity\CustomerAddress $customerAddress)
1174
    {
1175
        return $this->CustomerAddresses->removeElement($customerAddress);
1176
    }
1177
1178
    /**
1179
     * Get customerAddresses.
1180
     *
1181
     * @return \Doctrine\Common\Collections\Collection
1182
     */
1183 20
    public function getCustomerAddresses()
1184
    {
1185 20
        return $this->CustomerAddresses;
1186
    }
1187
1188
    /**
1189
     * Add order.
1190
     *
1191
     * @param \Eccube\Entity\Order $order
1192
     *
1193
     * @return Customer
1194
     */
1195 1
    public function addOrder(\Eccube\Entity\Order $order)
1196
    {
1197 1
        $this->Orders[] = $order;
1198
1199 1
        return $this;
1200
    }
1201
1202
    /**
1203
     * Remove order.
1204
     *
1205
     * @param \Eccube\Entity\Order $order
1206
     *
1207
     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
1208
     */
1209
    public function removeOrder(\Eccube\Entity\Order $order)
1210
    {
1211
        return $this->Orders->removeElement($order);
1212
    }
1213
1214
    /**
1215
     * Get orders.
1216
     *
1217
     * @return \Doctrine\Common\Collections\Collection
1218
     */
1219 3
    public function getOrders()
1220
    {
1221 3
        return $this->Orders;
1222
    }
1223
1224
    /**
1225
     * Set status.
1226
     *
1227
     * @param \Eccube\Entity\Master\CustomerStatus|null $status
1228
     *
1229
     * @return Customer
1230
     */
1231 309
    public function setStatus(\Eccube\Entity\Master\CustomerStatus $status = null)
1232
    {
1233 309
        $this->Status = $status;
1234
1235 309
        return $this;
1236
    }
1237
1238
    /**
1239
     * Get status.
1240
     *
1241
     * @return \Eccube\Entity\Master\CustomerStatus|null
1242
     */
1243 40
    public function getStatus()
1244
    {
1245 40
        return $this->Status;
1246
    }
1247
1248
    /**
1249
     * Set sex.
1250
     *
1251
     * @param \Eccube\Entity\Master\Sex|null $sex
1252
     *
1253
     * @return Customer
1254
     */
1255 323
    public function setSex(\Eccube\Entity\Master\Sex $sex = null)
1256
    {
1257 323
        $this->Sex = $sex;
1258
1259 323
        return $this;
1260
    }
1261
1262
    /**
1263
     * Get sex.
1264
     *
1265
     * @return \Eccube\Entity\Master\Sex|null
1266
     */
1267 62
    public function getSex()
1268
    {
1269 62
        return $this->Sex;
1270
    }
1271
1272
    /**
1273
     * Set job.
1274
     *
1275
     * @param \Eccube\Entity\Master\Job|null $job
1276
     *
1277
     * @return Customer
1278
     */
1279 323
    public function setJob(\Eccube\Entity\Master\Job $job = null)
1280
    {
1281 323
        $this->Job = $job;
1282
1283 323
        return $this;
1284
    }
1285
1286
    /**
1287
     * Get job.
1288
     *
1289
     * @return \Eccube\Entity\Master\Job|null
1290
     */
1291 62
    public function getJob()
1292
    {
1293 62
        return $this->Job;
1294
    }
1295
1296
    /**
1297
     * Set country.
1298
     *
1299
     * @param \Eccube\Entity\Master\Country|null $country
1300
     *
1301
     * @return Customer
1302
     */
1303
    public function setCountry(\Eccube\Entity\Master\Country $country = null)
1304
    {
1305
        $this->Country = $country;
1306
1307
        return $this;
1308
    }
1309
1310
    /**
1311
     * Get country.
1312
     *
1313
     * @return \Eccube\Entity\Master\Country|null
1314
     */
1315 52
    public function getCountry()
1316
    {
1317 52
        return $this->Country;
1318
    }
1319
1320
    /**
1321
     * Set pref.
1322
     *
1323
     * @param \Eccube\Entity\Master\Pref|null $pref
1324
     *
1325
     * @return Customer
1326
     */
1327 339
    public function setPref(\Eccube\Entity\Master\Pref $pref = null)
1328
    {
1329 339
        $this->Pref = $pref;
1330
1331 339
        return $this;
1332
    }
1333
1334
    /**
1335
     * Get pref.
1336
     *
1337
     * @return \Eccube\Entity\Master\Pref|null
1338
     */
1339 129
    public function getPref()
1340
    {
1341 129
        return $this->Pref;
1342
    }
1343
1344
    /**
1345
     * Set point
1346
     *
1347
     * @param string $point
1348
     *
1349
     * @return Customer
1350
     */
1351 306
    public function setPoint($point)
1352
    {
1353 306
        $this->point = $point;
1354
1355 306
        return $this;
1356
    }
1357
1358
    /**
1359
     * Get point
1360
     *
1361
     * @return string
1362
     */
1363 75
    public function getPoint()
1364
    {
1365 75
        return $this->point;
1366
    }
1367
}
1368