/**
 * ERP 마스터 동기화 라우트
 *  자동화 관리 > 배치 관리 화면에서 호출하는 ERP REST API → 내부 DB 적재 엔드포인트.
 */
import { Router } from "express";
import { authenticateToken } from "../middleware/authMiddleware";
import {
  syncEmployeesHandler,
  syncDepartmentsHandler,
  syncWarehousesHandler,
  syncCustomersHandler,
  syncAccountCodesHandler,
  syncAllHandler,
} from "../controllers/erpSyncController";

const router = Router();

router.use(authenticateToken);

router.post("/employees", syncEmployeesHandler);
router.post("/departments", syncDepartmentsHandler);
router.post("/warehouses", syncWarehousesHandler);
router.post("/customers", syncCustomersHandler);
router.post("/account-codes", syncAccountCodesHandler);
router.post("/all", syncAllHandler);

export default router;
