-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathUserStats.php
87 lines (70 loc) · 2.09 KB
/
UserStats.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
<?php
declare(strict_types=1);
namespace PhpList\Core\Domain\Model\Analytics;
use Doctrine\ORM\Mapping as ORM;
use PhpList\Core\Domain\Model\Interfaces\DomainModel;
use PhpList\Core\Domain\Model\Interfaces\Identity;
use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity]
#[ORM\Table(name: 'phplist_userstats')]
#[ORM\UniqueConstraint(name: 'entry', columns: ['unixdate', 'item', 'listid'])]
#[ORM\Index(name: 'dateindex', columns: ['unixdate'])]
#[ORM\Index(name: 'itemindex', columns: ['item'])]
#[ORM\Index(name: 'listdateindex', columns: ['listid', 'unixdate'])]
#[ORM\Index(name: 'listindex', columns: ['listid'])]
class UserStats implements DomainModel, Identity
{
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue]
#[Groups(['SubscriberList', 'SubscriberListMembers'])]
private ?int $id = null;
#[ORM\Column(name: 'unixdate', type: 'integer', nullable: true)]
private ?int $unixDate = null;
#[ORM\Column(name: 'item', type: 'string', length: 255, nullable: true)]
private ?string $item = null;
#[ORM\Column(name: 'listid', type: 'integer', options: ['default' => 0])]
private int $listId = 0;
#[ORM\Column(name: 'value', type: 'integer', options: ['default' => 0])]
private int $value = 0;
public function getId(): ?int
{
return $this->id;
}
public function getUnixDate(): ?int
{
return $this->unixDate;
}
public function getItem(): ?string
{
return $this->item;
}
public function getListId(): int
{
return $this->listId;
}
public function getValue(): int
{
return $this->value;
}
public function setUnixDate(?int $unixDate): self
{
$this->unixDate = $unixDate;
return $this;
}
public function setItem(?string $item): self
{
$this->item = $item;
return $this;
}
public function setListId(int $listId): self
{
$this->listId = $listId;
return $this;
}
public function setValue(int $value): self
{
$this->value = $value;
return $this;
}
}