18 lines
414 B
PHP
18 lines
414 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ChatMessage extends Model
|
|
{
|
|
protected $table = 'chat_messages';
|
|
protected $fillable = ['conversation_id', 'tipo', 'contenido', 'leido'];
|
|
|
|
public function conversation(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ChatConversation::class, 'conversation_id');
|
|
}
|
|
}
|