'array', 'key_decisions' => 'array', 'sentiment_breakdown' => 'array', 'angry_analysis' => 'array', 'emotion_details' => 'array', 'todo_items' => 'array', 'recordings' => 'array', 'emailed_to' => 'array', 'emailed_at' => 'datetime', ]; /** * Parent meeting. */ public function meeting() { return $this->belongsTo(ClientMeeting::class, 'client_meeting_id'); } /** * Parent client profile. */ public function client() { return $this->belongsTo(Client::class, 'client_id'); } /** * User who initiated or finalized this note. */ public function creator() { return $this->belongsTo(User::class, 'created_by'); } /** * Check if client expression was angry or frustrated. */ public function isAngry(): bool { return strtolower($this->detected_sentiment) === 'angry' || (!empty($this->angry_analysis) && ($this->angry_analysis['is_angry'] ?? false)); } }