|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Orm\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\ORM\Mapping\Column; |
|
8
|
|
|
use Doctrine\ORM\Mapping\Entity; |
|
9
|
|
|
use Doctrine\ORM\Mapping\GeneratedValue; |
|
10
|
|
|
use Doctrine\ORM\Mapping\Id; |
|
11
|
|
|
use Doctrine\ORM\Mapping\Table; |
|
12
|
|
|
use Doctrine\ORM\Mapping\UniqueConstraint; |
|
13
|
|
|
use Stu\Orm\Repository\RpgPlotMemberArchivRepository; |
|
14
|
|
|
|
|
15
|
|
|
#[Table(name: 'stu_plots_members_archiv')] |
|
16
|
|
|
#[UniqueConstraint(name: 'plot_archiv_user_idx', columns: ['plot_id', 'user_id'])] |
|
17
|
|
|
#[Entity(repositoryClass: RpgPlotMemberArchivRepository::class)] |
|
18
|
|
|
class RpgPlotMemberArchiv |
|
19
|
|
|
{ |
|
20
|
|
|
#[Id] |
|
21
|
|
|
#[Column(type: 'integer')] |
|
22
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
|
23
|
|
|
private int $id; |
|
24
|
|
|
|
|
25
|
|
|
#[Column(type: 'string')] |
|
26
|
|
|
private string $version = ''; |
|
27
|
|
|
|
|
28
|
|
|
#[Column(type: 'integer')] |
|
29
|
|
|
private int $former_id = 0; |
|
30
|
|
|
|
|
31
|
|
|
#[Column(type: 'integer')] |
|
32
|
|
|
private int $plot_id = 0; |
|
33
|
|
|
|
|
34
|
|
|
#[Column(type: 'integer')] |
|
35
|
|
|
private int $user_id = 0; |
|
36
|
|
|
|
|
37
|
|
|
#[Column(type: 'string', nullable: true)] |
|
38
|
|
|
private ?string $username = null; |
|
39
|
|
|
|
|
40
|
|
|
public function getId(): int |
|
41
|
|
|
{ |
|
42
|
|
|
return $this->id; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
public function getVersion(): ?string |
|
46
|
|
|
{ |
|
47
|
|
|
return $this->version; |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
public function getFormerId(): int |
|
51
|
|
|
{ |
|
52
|
|
|
return $this->former_id; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
public function getPlotId(): int |
|
56
|
|
|
{ |
|
57
|
|
|
return $this->plot_id; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function getUserId(): int |
|
61
|
|
|
{ |
|
62
|
|
|
return $this->user_id; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
public function getUsername(): ?string |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->username; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
public function setUsername(?string $username): RpgPlotMemberArchiv |
|
71
|
|
|
{ |
|
72
|
|
|
$this->username = $username; |
|
73
|
|
|
return $this; |
|
74
|
|
|
} |
|
75
|
|
|
} |
|
76
|
|
|
|