28 lines
572 B
PHP
28 lines
572 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AIDecision extends Model
|
|
{
|
|
protected $table = 'ai_decisions';
|
|
|
|
protected $fillable = ['ticket_id', 'article_id', 'confidence', 'explanation', 'raw_response'];
|
|
|
|
protected $casts = [
|
|
'raw_response' => 'array',
|
|
];
|
|
|
|
public function ticket(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Ticket::class);
|
|
}
|
|
|
|
public function article(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Article::class);
|
|
}
|
|
}
|