1 | <?php |
||
24 | trait Team |
||
25 | { |
||
26 | use UUIDEntity; |
||
27 | use NameEntity; |
||
28 | |||
29 | //<editor-fold desc="Fields"> |
||
30 | |||
31 | /** |
||
32 | * @ORM\ManyToMany(targetEntity="\Tfboe\FmLib\Entity\PlayerInterface", indexBy="playerId") |
||
33 | * @ORM\JoinTable(name="relation__team_players", |
||
34 | * joinColumns={@ORM\JoinColumn(name="team_id", referencedColumnName="id")}, |
||
35 | * inverseJoinColumns={@ORM\JoinColumn(name="player_id", referencedColumnName="player_id")} |
||
36 | * ) |
||
37 | * |
||
38 | * @var Collection|Player[] |
||
39 | */ |
||
40 | private $players; |
||
41 | |||
42 | /** |
||
43 | * @ORM\ManyToOne(targetEntity="\Tfboe\FmLib\Entity\CompetitionInterface", inversedBy="teams") |
||
44 | * @var CompetitionInterface |
||
45 | */ |
||
46 | private $competition; |
||
47 | |||
48 | /** |
||
49 | * @ORM\Column(type="integer") |
||
50 | * @var int |
||
51 | */ |
||
52 | private $rank; |
||
53 | |||
54 | /** |
||
55 | * @ORM\Column(type="integer") |
||
56 | * @var int |
||
57 | */ |
||
58 | private $startNumber; |
||
59 | //</editor-fold desc="Fields"> |
||
60 | |||
61 | //<editor-fold desc="Constructor"> |
||
62 | //</editor-fold desc="Constructor"> |
||
63 | |||
64 | //<editor-fold desc="Public Methods"> |
||
65 | /** |
||
66 | * @return CompetitionInterface |
||
67 | */ |
||
68 | public function getCompetition(): CompetitionInterface |
||
72 | |||
73 | /** |
||
74 | * @return Player[]|Collection |
||
75 | */ |
||
76 | public function getPlayers() |
||
80 | |||
81 | /** |
||
82 | * @return int |
||
83 | */ |
||
84 | public function getRank(): int |
||
88 | |||
89 | /** |
||
90 | * @return int |
||
91 | */ |
||
92 | public function getStartNumber(): int |
||
96 | |||
97 | /** |
||
98 | * @param CompetitionInterface $competition |
||
99 | */ |
||
100 | public function setCompetition(CompetitionInterface $competition) |
||
108 | |||
109 | /** |
||
110 | * @param int $rank |
||
111 | */ |
||
112 | public function setRank(int $rank) |
||
116 | |||
117 | /** |
||
118 | * @param int $startNumber |
||
119 | */ |
||
120 | public function setStartNumber(int $startNumber) |
||
124 | //</editor-fold desc="Public Methods"> |
||
125 | |||
126 | //<editor-fold desc="Protected Final Methods"> |
||
127 | /** |
||
128 | * Team init |
||
129 | */ |
||
130 | protected final function init() |
||
135 | //</editor-fold desc="Protected Final Methods"> |
||
136 | } |