35 lines
662 B
PHP
35 lines
662 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ToolCall extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'message_id',
|
|
'tool',
|
|
'input',
|
|
'output',
|
|
'duration_ms',
|
|
'success',
|
|
'error',
|
|
];
|
|
|
|
protected $casts = [
|
|
'input' => 'array',
|
|
'output' => 'array',
|
|
'duration_ms' => 'integer',
|
|
'success' => 'boolean',
|
|
];
|
|
|
|
public function message(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Message::class);
|
|
}
|
|
}
|