kick forever
CI/CD / test_and_check_app (push) Successful in 2m19s
CI/CD / Publish immutable image (push) Successful in 1m16s

This commit is contained in:
2026-09-24 14:38:18 +02:00
parent b190ff719e
commit 4dfe79ce5c
22 changed files with 271 additions and 113 deletions
-14
View File
@@ -2,7 +2,6 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -16,7 +15,6 @@ use Illuminate\Support\Carbon;
* @property string $name
* @property bool $is_moderator
* @property Carbon|null $last_seen_at
* @property Carbon|null $inactive_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Room $room
@@ -30,7 +28,6 @@ class Player extends Model
'name',
'is_moderator',
'last_seen_at',
'inactive_at',
];
protected function casts(): array
@@ -38,7 +35,6 @@ class Player extends Model
return [
'is_moderator' => 'boolean',
'last_seen_at' => 'datetime',
'inactive_at' => 'datetime',
];
}
@@ -85,14 +81,4 @@ class Player extends Model
'last_seen_at' => now(),
]);
}
/**
* @param Builder<Player> $query
* @return Builder<Player>
*/
public function scopeActive(Builder $query): Builder
{
return $query->whereNull('inactive_at');
}
}
-6
View File
@@ -93,12 +93,6 @@ class Room extends Model
}
/** @return HasMany<Player, $this> */
public function activePlayers(): HasMany
{
return $this->hasMany(Player::class)->whereNull('inactive_at');
}
/** @return BelongsTo<User, $this> */
public function owner(): BelongsTo
{