32 lines
613 B
PHP
32 lines
613 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class AgentConversationMessage extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'agent_conversation_messages';
|
||
|
|
|
||
|
|
public $incrementing = false;
|
||
|
|
|
||
|
|
protected $keyType = 'string';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'id',
|
||
|
|
'conversation_id',
|
||
|
|
'user_id',
|
||
|
|
'agent',
|
||
|
|
'role',
|
||
|
|
'content',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function conversation(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(ChatWithConversation::class, 'conversation_id');
|
||
|
|
}
|
||
|
|
}
|