Merge remote-tracking branch 'upstream/main'
This commit is contained in:
49
backend-node/src/routes/moldRoutes.ts
Normal file
49
backend-node/src/routes/moldRoutes.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import express from "express";
|
||||
import { authenticateToken } from "../middleware/authMiddleware";
|
||||
import {
|
||||
getMoldList,
|
||||
getMoldDetail,
|
||||
createMold,
|
||||
updateMold,
|
||||
deleteMold,
|
||||
getMoldSerials,
|
||||
createMoldSerial,
|
||||
deleteMoldSerial,
|
||||
getMoldInspections,
|
||||
createMoldInspection,
|
||||
deleteMoldInspection,
|
||||
getMoldParts,
|
||||
createMoldPart,
|
||||
deleteMoldPart,
|
||||
getMoldSerialSummary,
|
||||
} from "../controllers/moldController";
|
||||
|
||||
const router = express.Router();
|
||||
router.use(authenticateToken);
|
||||
|
||||
// 금형 마스터
|
||||
router.get("/", getMoldList);
|
||||
router.get("/:moldCode", getMoldDetail);
|
||||
router.post("/", createMold);
|
||||
router.put("/:moldCode", updateMold);
|
||||
router.delete("/:moldCode", deleteMold);
|
||||
|
||||
// 일련번호
|
||||
router.get("/:moldCode/serials", getMoldSerials);
|
||||
router.post("/:moldCode/serials", createMoldSerial);
|
||||
router.delete("/serials/:id", deleteMoldSerial);
|
||||
|
||||
// 일련번호 현황 집계
|
||||
router.get("/:moldCode/serial-summary", getMoldSerialSummary);
|
||||
|
||||
// 점검항목
|
||||
router.get("/:moldCode/inspections", getMoldInspections);
|
||||
router.post("/:moldCode/inspections", createMoldInspection);
|
||||
router.delete("/inspections/:id", deleteMoldInspection);
|
||||
|
||||
// 부품
|
||||
router.get("/:moldCode/parts", getMoldParts);
|
||||
router.post("/:moldCode/parts", createMoldPart);
|
||||
router.delete("/parts/:id", deleteMoldPart);
|
||||
|
||||
export default router;
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
toggleLogTable,
|
||||
getCategoryColumnsByMenu, // 🆕 메뉴별 카테고리 컬럼 조회
|
||||
getCategoryColumnsByCompany, // 🆕 회사별 카테고리 컬럼 조회
|
||||
getNumberingColumnsByCompany, // 채번 타입 컬럼 조회
|
||||
multiTableSave, // 🆕 범용 다중 테이블 저장
|
||||
getTableEntityRelations, // 🆕 두 테이블 간 엔티티 관계 조회
|
||||
getReferencedByTables, // 🆕 현재 테이블을 참조하는 테이블 조회
|
||||
@@ -254,6 +255,12 @@ router.post("/tables/:tableName/log/toggle", toggleLogTable);
|
||||
*/
|
||||
router.get("/category-columns", getCategoryColumnsByCompany);
|
||||
|
||||
/**
|
||||
* 회사 기준 모든 채번 타입 컬럼 조회
|
||||
* GET /api/table-management/numbering-columns
|
||||
*/
|
||||
router.get("/numbering-columns", getNumberingColumnsByCompany);
|
||||
|
||||
/**
|
||||
* 메뉴의 형제 메뉴들이 사용하는 모든 테이블의 카테고리 타입 컬럼 조회
|
||||
* GET /api/table-management/menu/:menuObjid/category-columns
|
||||
|
||||
Reference in New Issue
Block a user