'array', 'triggers' => 'array', 'is_enabled' => 'boolean', 'notify_before_hours' => 'integer', ]; // ── Channel icons/labels ───────────────────────────────────── public static array $channelMeta = [ 'email' => ['icon' => '✉️', 'label' => 'Email', 'color' => '#AEC6CF'], 'telegram' => ['icon' => '✈️', 'label' => 'Telegram', 'color' => '#E8D5F5'], 'whatsapp' => ['icon' => '💬', 'label' => 'WhatsApp', 'color' => '#B5EAD7'], ]; public function getChannelIconAttribute(): string { return static::$channelMeta[$this->channel]['icon'] ?? '🔔'; } public function getChannelLabelAttribute(): string { return static::$channelMeta[$this->channel]['label'] ?? ucfirst($this->channel); } // ── Trigger helpers ────────────────────────────────────────── public static array $triggerMeta = [ 'upcoming_event' => ['icon' => '📅', 'label' => 'Upcoming Events'], 'invoice_due' => ['icon' => '🧾', 'label' => 'Invoice Due Date'], 'content_due' => ['icon' => '🎬', 'label' => 'Content Target Date'], ]; public function hasTrigger(string $trigger): bool { return in_array($trigger, $this->triggers ?? []); } }