32 lines
560 B
PHP
32 lines
560 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ChatHistory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'chat_histories';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'session_id',
|
|
'recommendation_id',
|
|
'prompt',
|
|
'response',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function recommendation()
|
|
{
|
|
return $this->belongsTo(Recommendation::class);
|
|
}
|
|
}
|