'integer', 'timeout' => 'integer', 'status' => 'string', ]; public function llmProvider(): BelongsTo { return $this->belongsTo(LlmProvider::class); } public function admins(): BelongsToMany { return $this->belongsToMany(Admin::class, 'admin_client') ->withTimestamps(); } /** * 检查客户是否处于活跃状态 */ public function isActive(): bool { return $this->status === self::STATUS_ACTIVE; } /** * 检查是否可以发送LLM请求 */ public function canSendLlmRequest(): bool { return $this->isActive() && $this->llmProvider->isActive(); } }