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.
58 lines
991 B
58 lines
991 B
<?php
|
|
|
|
namespace IQBall\Core\Data;
|
|
|
|
/**
|
|
* information about a team member
|
|
*/
|
|
class Member implements \JsonSerializable {
|
|
private User $user;
|
|
|
|
/**
|
|
* @var int The member's team id
|
|
*/
|
|
private int $teamId;
|
|
|
|
/**
|
|
* @var string the member's role
|
|
*/
|
|
private string $role;
|
|
|
|
/**
|
|
* @param User $user
|
|
* @param int $teamId
|
|
* @param string $role
|
|
*/
|
|
public function __construct(User $user, int $teamId, string $role) {
|
|
$this->user = $user;
|
|
$this->teamId = $teamId;
|
|
$this->role = $role;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getRole(): string {
|
|
return $this->role;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getTeamId(): int {
|
|
return $this->teamId;
|
|
}
|
|
|
|
/**
|
|
* @return User
|
|
*/
|
|
public function getUser(): User {
|
|
return $this->user;
|
|
}
|
|
|
|
|
|
public function jsonSerialize() {
|
|
return get_object_vars($this);
|
|
}
|
|
}
|