import { Router } from 'express';
import * as partController from '../controllers/partController.js';

const router = Router();

// Public routes (read-only)
router.get('/', partController.getAllParts);
router.get('/project/:projectId', partController.getPartsByProject);

// Modification routes
router.post('/', partController.createPart);
router.put('/:id', partController.updatePart);
router.delete('/:id', partController.deletePart);

export default router;
