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 int |
||
53 | * |
||
54 | * @ORM\Column(name="third_party_identifier", type="integer", nullable=true, unique=true) |
||
55 | */ |
||
56 | private $thirdPartyIdentifier; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | * |
||
61 | * @ORM\Column(name="address_type", type="string", length = 10) |
||
62 | */ |
||
63 | private $addressType; |
||
64 | |||
65 | 6 | public function __construct( string $addressType ) { |
|
71 | |||
72 | 6 | private function generateUuid(): void { |
|
75 | |||
76 | 3 | public function updateAddressIdentifier(): void { |
|
80 | |||
81 | 6 | public function getCurrentIdentifier(): string { |
|
87 | |||
88 | 3 | public function getPreviousIdentifier(): ?string { |
|
91 | |||
92 | public function getAddress(): Address { |
||
95 | |||
96 | public function setAddress( Address $address ) { |
||
99 | |||
100 | public function getThirdPartyIdentifier(): int { |
||
103 | |||
104 | public function setThirdPartyIdentifier( int $thirdPartyIdentifier ): void { |
||
107 | |||
108 | public function getAddressType(): string { |
||
111 | } |
||
112 |