Admin: For managing administrators with role-based access LlmProvider: For managing LLM service providers Created SQL schema: All tables as per the database design Proper foreign key constraints and indexes Timestamps for auditing Appropriate character sets and collations Added operation logging: Created LogService for centralized logging Integrated logging into TokenService Logs all token-related operations with user info and IP address Enhanced token management: Added comprehensive logging for all token operations Improved error handling and validation Added proper cleanup for revoked tokens
29 lines
494 B
PHP
29 lines
494 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class LlmProvider extends Model
|
|
{
|
|
protected $table = 'llm_providers';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'service_name',
|
|
'api_url',
|
|
'api_token',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'api_token',
|
|
];
|
|
|
|
public function clients(): HasMany
|
|
{
|
|
return $this->hasMany(Client::class);
|
|
}
|
|
}
|