select('email_templates.*, code AS template_key, code AS name, body_html AS body') ->where('is_active', 1) ->orderBy('code', 'asc') ->findAll(); } public function findByKey(string $key): ?array { return $this->select('email_templates.*, code AS template_key, code AS name, body_html AS body') ->where('code', $key) ->where('is_active', 1) ->first(); } }