*/ protected $casts = [ 'last_login_at' => 'datetime', 'password_hash' => 'hashed', ]; public function competition(): BelongsTo { return $this->belongsTo(Competition::class); } public function getAuthPassword(): ?string { return $this->password_hash; } public function usesPassword(): bool { return $this->password_hash !== null && $this->password_hash !== ''; } public function belongsToCompetition(int $competitionId): bool { return (int) $this->competition_id === $competitionId; } }