'array']; public function user(): BelongsTo { return $this->belongsTo(User::class); } public function conversations(): HasMany { return $this->hasMany(ChatConversation::class, 'contact_id'); } public function activeConversation(): ?ChatConversation { return $this->conversations() ->whereIn('estado', ['bot', 'agente']) ->latest() ->first(); } }