2025-12-10 15:59:04 +09:00
|
|
|
/**
|
|
|
|
|
* 조건부 연쇄 (Conditional Cascading) 라우트
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import express from "express";
|
|
|
|
|
import {
|
|
|
|
|
getConditions,
|
|
|
|
|
getConditionDetail,
|
|
|
|
|
createCondition,
|
|
|
|
|
updateCondition,
|
|
|
|
|
deleteCondition,
|
|
|
|
|
getFilteredOptions,
|
|
|
|
|
} from "../controllers/cascadingConditionController";
|
|
|
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
|
|
|
|
|
|
|
|
const router = express.Router();
|
|
|
|
|
|
|
|
|
|
// 인증 미들웨어 적용
|
|
|
|
|
router.use(authenticateToken);
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// 조건부 연쇄 규칙 관리 API
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
// 규칙 목록 조회
|
|
|
|
|
router.get("/", getConditions);
|
|
|
|
|
|
|
|
|
|
// 규칙 상세 조회
|
|
|
|
|
router.get("/:conditionId", getConditionDetail);
|
|
|
|
|
|
|
|
|
|
// 규칙 생성
|
|
|
|
|
router.post("/", createCondition);
|
|
|
|
|
|
|
|
|
|
// 규칙 수정
|
|
|
|
|
router.put("/:conditionId", updateCondition);
|
|
|
|
|
|
|
|
|
|
// 규칙 삭제
|
|
|
|
|
router.delete("/:conditionId", deleteCondition);
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// 조건부 필터링 적용 API (실제 사용)
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
// 조건에 따른 필터링된 옵션 조회
|
|
|
|
|
router.get("/filtered-options/:relationCode", getFilteredOptions);
|
|
|
|
|
|
|
|
|
|
export default router;
|
|
|
|
|
|
2025-12-12 18:28:58 +09:00
|
|
|
|
2025-12-15 14:51:41 +09:00
|
|
|
|
2025-12-17 17:41:29 +09:00
|
|
|
|
2025-12-18 16:35:55 +09:00
|
|
|
|
2025-12-19 15:44:38 +09:00
|
|
|
|
2025-12-23 10:11:21 +09:00
|
|
|
|
2025-12-23 14:20:18 +09:00
|
|
|
|