forked from opengento/magento2-gdpr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExportEntity.php
102 lines (83 loc) · 2.75 KB
/
ExportEntity.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/**
* Copyright © OpenGento, All rights reserved.
* See LICENSE bundled with this library for license details.
*/
declare(strict_types=1);
namespace Opengento\Gdpr\Model;
use Magento\Framework\Model\AbstractExtensibleModel;
use Opengento\Gdpr\Api\Data\ExportEntityInterface;
use Opengento\Gdpr\Model\ResourceModel\ExportEntity as EraseEntityResource;
class ExportEntity extends AbstractExtensibleModel implements ExportEntityInterface
{
protected function _construct(): void
{
$this->_eventPrefix = 'opengento_gdpr_export_entity';
$this->_eventObject = 'export_entity';
$this->_init(EraseEntityResource::class);
}
public function getExportId(): int
{
return (int) $this->getId();
}
public function setExportId(int $exportId): ExportEntityInterface
{
return $this->setId($exportId);
}
public function getEntityId(): int
{
return (int) $this->_getData(self::ENTITY_ID);
}
public function setEntityId($entityId): ExportEntityInterface
{
return $this->setData(self::ENTITY_ID, $entityId);
}
public function getEntityType(): string
{
return (string) $this->_getData(self::ENTITY_TYPE);
}
public function setEntityType(string $entityType): ExportEntityInterface
{
return $this->setData(self::ENTITY_TYPE, $entityType);
}
public function getFileName(): string
{
return (string) $this->_getData(self::FILE_NAME);
}
public function setFileName(string $filename): ExportEntityInterface
{
return $this->setData(self::FILE_NAME, $filename);
}
public function getFilePath(): ?string
{
return $this->_getData(self::FILE_PATH) === null ? null : (string) $this->_getData(self::FILE_PATH);
}
public function setFilePath(?string $filePath): ExportEntityInterface
{
return $this->setData(self::FILE_PATH, $filePath);
}
public function getCreatedAt(): string
{
return (string) $this->_getData(self::CREATED_AT);
}
public function setCreatedAt(string $createdAt): ExportEntityInterface
{
return $this->setData(self::CREATED_AT, $createdAt);
}
public function getExportedAt(): ?string
{
return $this->_getData(self::EXPORTED_AT) === null ? null : (string) $this->_getData(self::EXPORTED_AT);
}
public function setExportedAt(string $exportedAt): ExportEntityInterface
{
return $this->setData(self::EXPORTED_AT, $exportedAt);
}
public function getExpiredAt(): string
{
return (string) $this->_getData(self::EXPIRED_AT);
}
public function setExpiredAt(string $expiredAt): ExportEntityInterface
{
return $this->setData(self::EXPIRED_AT, $expiredAt);
}
}