import express from "express";
import { mountCrudTables } from "./crudRouter.js";
import swiDocumentRoutes from "./swiDocumentRoutes.js";

const router = express.Router();

router.use(swiDocumentRoutes);

/** Other tables from `sql/swi.sql` (generic CRUD). */
mountCrudTables(router, [
  ["swi_job_area", ["job_area_id"]],
  ["swi_document_status", ["document_status_id"]],
  ["swi_document_page_map", ["page_id"]],
  ["swi_text_blocks", ["text_block_id"]],
  ["swi_text_block_icons", ["block_icon_id"]],
  ["swi_images", ["image_id"]],
  ["swi_icons", ["icon_id"]],
]);

export default router;
