1
|
|
|
<?php |
2
|
|
|
namespace MrPrompt\ShipmentCommon\Base; |
3
|
|
|
|
4
|
|
|
/** |
5
|
|
|
* |
6
|
|
|
* @author Thiago Paes <[email protected]> |
7
|
|
|
*/ |
8
|
|
|
class Customer extends Person |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* @var int |
12
|
|
|
*/ |
13
|
|
|
private $code; |
|
|
|
|
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @var int |
17
|
|
|
*/ |
18
|
|
|
private $identityNumber; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var bool |
22
|
|
|
*/ |
23
|
|
|
private $helpfulMaturity; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var int |
27
|
|
|
*/ |
28
|
|
|
private $workingDays; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Constructor |
32
|
|
|
* |
33
|
|
|
* @param int $code |
34
|
|
|
* @param int $identityNumber |
35
|
|
|
* @param bool $helpfulMaturity |
36
|
|
|
* @param int $workingDays |
37
|
|
|
*/ |
38
|
15 |
|
public function __construct( |
39
|
|
|
int $code = 0, |
40
|
|
|
int $identityNumber = 0, |
41
|
|
|
bool $helpfulMaturity = false, |
42
|
|
|
int $workingDays = 0 |
43
|
|
|
) { |
44
|
15 |
|
$this->code = $code; |
45
|
15 |
|
$this->identityNumber = $identityNumber; |
46
|
15 |
|
$this->helpfulMaturity = $helpfulMaturity; |
47
|
15 |
|
$this->workingDays = $workingDays; |
48
|
15 |
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return int |
52
|
|
|
*/ |
53
|
1 |
|
public function getCode(): int |
54
|
|
|
{ |
55
|
1 |
|
return $this->code; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param int $code |
60
|
|
|
*/ |
61
|
2 |
|
public function setCode(int $code) |
62
|
|
|
{ |
63
|
2 |
|
$this->code = $code; |
64
|
2 |
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return int |
68
|
|
|
*/ |
69
|
1 |
|
public function getIdentityNumber(): int |
70
|
|
|
{ |
71
|
1 |
|
return $this->identityNumber; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param int $identityNumber |
76
|
|
|
*/ |
77
|
1 |
|
public function setIdentityNumber(int $identityNumber) |
78
|
|
|
{ |
79
|
1 |
|
$this->identityNumber = $identityNumber; |
80
|
1 |
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return mixed |
84
|
|
|
*/ |
85
|
1 |
|
public function getHelpfulMaturity(): bool |
86
|
|
|
{ |
87
|
1 |
|
return $this->helpfulMaturity; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @param boolean $helpfulMaturity |
92
|
|
|
*/ |
93
|
1 |
|
public function setHelpfulMaturity(bool $helpfulMaturity = true) |
94
|
|
|
{ |
95
|
1 |
|
$this->helpfulMaturity = $helpfulMaturity; |
96
|
1 |
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return int |
100
|
|
|
*/ |
101
|
1 |
|
public function getWorkingDays(): int |
102
|
|
|
{ |
103
|
1 |
|
return $this->workingDays; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @param int $workingDays |
108
|
|
|
*/ |
109
|
1 |
|
public function setWorkingDays(int $workingDays) |
110
|
|
|
{ |
111
|
1 |
|
$this->workingDays = $workingDays; |
112
|
1 |
|
} |
113
|
|
|
} |
114
|
|
|
|