db = db_connect(); } public function insertPayment(array $data): int { $this->db->table('payment_history')->insert($data); return (int) $this->db->insertID(); } public function updatePayment(array $data, int $id): bool { return (bool) $this->db->table('payment_history')->where('id', $id)->update($data); } }