import { Router } from "express";
import { EntityReferenceController } from "../controllers/entityReferenceController";
import { authenticateToken } from "../middleware/authMiddleware";

const router = Router();

/**
 * GET /api/entity-reference/code/:codeCategory
 * 공통 코드 데이터 조회
 */
router.get(
  "/code/:codeCategory",
  authenticateToken,
  EntityReferenceController.getCodeData
);

/**
 * GET /api/entity-reference/:tableName/:columnName
 * 엔티티 참조 데이터 조회
 */
router.get(
  "/:tableName/:columnName",
  authenticateToken,
  EntityReferenceController.getEntityReferenceData
);

export default router;
