63 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Teamtable;
 | |
| 
 | |
| use \InvalidArgumentException;
 | |
| 
 | |
| /**
 | |
|  * Represents a team in the teamtable database
 | |
|  * TODO: Add validation for setters
 | |
|  */
 | |
| class Team
 | |
| {
 | |
|     public int $id;
 | |
|     public string $name       = 'NN';
 | |
|     public string $company    = 'NN';
 | |
|     public string $cardnumber = 'NN';
 | |
|     public string $leader     = 'NN';
 | |
|     public int $phone         = 0;
 | |
|     public int $participants  = 0;
 | |
|     public int $rounds        = 0;
 | |
| 
 | |
|     public function setName(string $name): Self
 | |
|     {
 | |
|         $this->name = $name;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setCompany(string $company): Self
 | |
|     {
 | |
|         $this->company = $company;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setCardnumber(string $cardnumber): Self
 | |
|     {
 | |
|         $this->cardnumber = $cardnumber;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setLeader(string $leader): Self
 | |
|     {
 | |
|         $this->leader = $leader;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setPhone(int $phone): Self
 | |
|     {
 | |
|         $this->phone = $phone;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setParticipants(int $participants): Self
 | |
|     {
 | |
|         $this->participants = $participants;
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
|     public function setRounds(int $rounds): Self
 | |
|     {
 | |
|         $this->rounds = $rounds;
 | |
|         return $this;
 | |
|     }
 | |
| } |