import { getDb } from "../config/db.js";

export const listTaxRules = async (_req, res) => {
  const db = getDb();
  const [rows] = await db.execute(
    "SELECT service_type, asset_type, min_amount, max_amount, tax_type, tax_value FROM tax_rules WHERE is_active = 1"
  );
  res.json(rows);
};
