const express = require('express');
const router = express.Router();
const { authenticate } = require('../middlewares/auth');
const controller = require('../controllers/weldingVisualInspectionReportController');
const pdfController = require('../controllers/weldingVisualInspectionReportPDFController');

router.use(authenticate);

router.get('/', controller.getAll);
router.get('/work-order-options', controller.getWorkOrderOptions);
router.get('/work-order-prefill/:workOrderId', controller.getWorkOrderPrefill);
router.get('/:id/pdf', pdfController.generatePDF);
router.get('/:id', controller.getById);
router.post('/', controller.create);
router.put('/:id', controller.update);
router.patch('/:id/status', controller.updateStatus);
router.delete('/:id', controller.delete);

module.exports = router;

