You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.5 KiB
76 lines
1.5 KiB
<?php
|
|
|
|
namespace App\Data;
|
|
|
|
class Team {
|
|
private int $id;
|
|
private string $name;
|
|
private string $picture;
|
|
private Color $mainColor;
|
|
private Color $secondColor;
|
|
|
|
/**
|
|
* @var Member[] maps users with their role
|
|
*/
|
|
private array $members;
|
|
|
|
/**
|
|
* @param string $name
|
|
* @param string $picture
|
|
* @param Color $mainColor
|
|
* @param Color $secondColor
|
|
* @param Member[] $members
|
|
*/
|
|
public function __construct(int $id, string $name, string $picture, Color $mainColor, Color $secondColor, array $members = []) {
|
|
$this->id = $id;
|
|
$this->name = $name;
|
|
$this->picture = $picture;
|
|
$this->mainColor = $mainColor;
|
|
$this->secondColor = $secondColor;
|
|
$this->members = $members;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getId(): int {
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName(): string {
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getPicture(): string {
|
|
return $this->picture;
|
|
}
|
|
|
|
/**
|
|
* @return Color
|
|
*/
|
|
public function getMainColor(): Color {
|
|
return $this->mainColor;
|
|
}
|
|
|
|
/**
|
|
* @return Color
|
|
*/
|
|
public function getSecondColor(): Color {
|
|
return $this->secondColor;
|
|
}
|
|
|
|
/**
|
|
* @return Member[]
|
|
*/
|
|
public function listMembers(): array {
|
|
return $this->members;
|
|
}
|
|
|
|
}
|