MAPG-235 refactor: renamed fields in challenge related tables

This commit is contained in:
balazs committed 2021-05-16 13:14:00 +02:00
1 parent 7a1674fdd0
commit 7792f1c3ff
8 files changed
+36 -38

No files matched your search

+6 -6
View File
@@ -4,7 +4,7 @@ class UserInChallenge extends Model
{
protected static string $table = 'user_in_challenge';
protected static array $fields = ['user_id', 'challenge_id', 'round', 'time_left', 'is_owner'];
protected static array $fields = ['user_id', 'challenge_id', 'current_round', 'time_left', 'is_owner'];
protected static array $relations = ['user' => User::class, 'challenge' => Challenge::class];
@@ -16,7 +16,7 @@ class UserInChallenge extends Model
private ?int $challengeId = null;
private int $round = 0;
private int $currentRound = 0;
private ?int $timeLeft = null;
@@ -42,9 +42,9 @@ class UserInChallenge extends Model
$this->challengeId = $challengeId;
}
public function setRound(int $round): void
public function setCurrentRound(int $currentRound): void
{
$this->round = $round;
$this->currentRound = $currentRound;
}
public function setTimeLeft(?int $timeLeft): void
@@ -79,9 +79,9 @@ class UserInChallenge extends Model
return $this->challengeId;
}
public function getRound(): int
public function getCurrentRound(): int
{
return $this->round;
return $this->currentRound;
}
public function getTimeLeft(): ?int