1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Superdesk Web Publisher Core Bundle. |
7
|
|
|
* |
8
|
|
|
* Copyright 2020 Sourcefabric z.ú. and contributors. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, please see the |
11
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
12
|
|
|
* |
13
|
|
|
* @copyright 2020 Sourcefabric z.ú |
14
|
|
|
* @license http://www.superdesk.org/license |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace SWP\Bundle\CoreBundle\Model; |
18
|
|
|
|
19
|
|
|
use SWP\Component\Common\Model\DateTime; |
20
|
|
|
use SWP\Component\Common\Model\TimestampableTrait; |
21
|
|
|
use SWP\Component\MultiTenancy\Model\TenantAwareTrait; |
22
|
|
|
|
23
|
|
|
class AnalyticsReport implements AnalyticsReportInterface |
24
|
|
|
{ |
25
|
|
|
use TimestampableTrait; |
26
|
|
|
use TenantAwareTrait; |
27
|
|
|
|
28
|
|
|
/** @var int */ |
29
|
|
|
protected $id; |
30
|
|
|
|
31
|
|
|
/** @var string */ |
32
|
|
|
protected $assetId; |
33
|
|
|
|
34
|
|
|
/** @var string */ |
35
|
|
|
protected $fileExtension; |
36
|
|
|
|
37
|
|
|
/** @var UserInterface */ |
38
|
|
|
protected $user; |
39
|
|
|
|
40
|
|
|
/** @var string */ |
41
|
|
|
protected $status = AnalyticsReportInterface::STATUS_PROCESSING; |
42
|
|
|
|
43
|
|
|
public function __construct() |
44
|
|
|
{ |
45
|
|
|
$this->createdAt = DateTime::getCurrentDateTime(); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function getId(): int |
49
|
|
|
{ |
50
|
|
|
return $this->id; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
public function getAssetId(): string |
54
|
|
|
{ |
55
|
|
|
return $this->assetId; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
public function setAssetId(string $assetId): void |
59
|
|
|
{ |
60
|
|
|
$this->assetId = $assetId; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function getFileExtension(): string |
64
|
|
|
{ |
65
|
|
|
return $this->fileExtension; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function setFileExtension($fileExtension): void |
69
|
|
|
{ |
70
|
|
|
$this->fileExtension = $fileExtension; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function getUser(): UserInterface |
74
|
|
|
{ |
75
|
|
|
return $this->user; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
public function setUser(UserInterface $user): void |
79
|
|
|
{ |
80
|
|
|
$this->user = $user; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
public function getStatus(): string |
84
|
|
|
{ |
85
|
|
|
return $this->status; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
public function setStatus(string $status): void |
89
|
|
|
{ |
90
|
|
|
$this->status = $status; |
91
|
|
|
} |
92
|
|
|
} |
93
|
|
|
|