1 | <?php |
||
16 | class AddressChange { |
||
17 | |||
18 | public const ADDRESS_TYPE_PERSON = 'person'; |
||
19 | |||
20 | public const ADDRESS_TYPE_COMPANY = 'company'; |
||
21 | |||
22 | /** |
||
23 | * @var integer |
||
24 | * |
||
25 | * @ORM\Column(name="id", type="integer") |
||
26 | * @ORM\Id |
||
27 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
28 | */ |
||
29 | private $id; |
||
30 | |||
31 | /** |
||
32 | * @ORM\ManyToOne(targetEntity="Address") |
||
33 | * @ORM\JoinColumn(name="address_id", referencedColumnName="id") |
||
34 | */ |
||
35 | private $address; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * |
||
40 | * @ORM\Column(name="current_identifier", type="string", length=36, nullable=true, unique=true) |
||
41 | */ |
||
42 | private $identifier; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | * |
||
47 | * @ORM\Column(name="previous_identifier", type="string", length=36, nullable=true, unique=true) |
||
48 | */ |
||
49 | private $previousIdentifier; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | * |
||
54 | * @ORM\Column(name="address_type", type="string", length = 10) |
||
55 | */ |
||
56 | private $addressType; |
||
57 | |||
58 | 6 | public function __construct( string $addressType ) { |
|
64 | |||
65 | 6 | private function generateUuid(): void { |
|
68 | |||
69 | 3 | public function updateAddressIdentifier(): void { |
|
73 | |||
74 | 6 | public function getCurrentIdentifier(): string { |
|
80 | |||
81 | 3 | public function getPreviousIdentifier(): ?string { |
|
84 | |||
85 | public function getAddress(): Address { |
||
88 | |||
89 | public function setAddress( Address $address ) { |
||
92 | |||
93 | public function getAddressType(): string { |
||
96 | } |
||
97 |