Failed Conditions
Push — feature/customize-username-tes... ( 2b9ec8 )
by Kiyotaka
04:16
created

Customer::getUsernameField()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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