// routes/taskRoutes.js
const express = require('express');
const router = express.Router();
const taskController = require('../controllers/taskController');

// CREATE 작업
router.post('/', taskController.createTask);

// READ ALL 작업
router.get('/', taskController.getAllTasks);

// READ ACTIVE 작업
router.get('/active/list', taskController.getActiveTasks);

// READ BY WORK TYPE (공정별)
router.get('/by-work-type/:work_type_id', taskController.getTasksByWorkType);

// READ ONE 작업
router.get('/:id', taskController.getTaskById);

// UPDATE 작업
router.put('/:id', taskController.updateTask);

// DELETE 작업
router.delete('/:id', taskController.deleteTask);

module.exports = router;
