// const express = require("express");
// const router = express.Router();

// const salesCustomerPriceController = require("../../controllers/postgre/salesCustomerPriceController");
// const authenticate = require("../../middlewares/authenticate");

// /**
//  * @swagger
//  * tags:
//  *   name: Sales Customer Price
//  *   description: Sales customer price creation, listing, update and deletion APIs
//  */

// /* ===========================
//    ✅ CREATE SALES CUSTOMER PRICE
// =========================== */
// router.post(
//   "/create",
//   authenticate,
//   (req, res) => {
//     /*
//       #swagger.tags = ['Sales Customer Price']
//       #swagger.summary = 'Create sales customer price'
//       #swagger.security = [{ "bearerAuth": [] }]
//     */

//     salesCustomerPriceController.createSalesCustomerPrice(req, res);
//   }
// );

// /* ===========================
//    ✅ UPDATE SALES CUSTOMER PRICE
// =========================== */
// router.patch(
//   "/:id",
//   authenticate,
//   (req, res) => {
//     /*
//       #swagger.tags = ['Sales Customer Price']
//       #swagger.summary = 'Patch update sales customer price by ID'
//       #swagger.security = [{ "bearerAuth": [] }]
//     */

//     salesCustomerPriceController.updateSalesCustomerPrice(req, res);
//   }
// );

// /* ===========================
//    ✅ GET ALL SALES CUSTOMER PRICES
// =========================== */
// router.get(
//   "/all",
//   authenticate,
//   (req, res) => {
//     /*
//       #swagger.tags = ['Sales Customer Price']
//       #swagger.summary = 'Get all sales customer prices'
//       #swagger.security = [{ "bearerAuth": [] }]
//     */

//     salesCustomerPriceController.getSalesCustomerPrices(req, res);
//   }
// );

// /* ===========================
//    ✅ GET SALES CUSTOMER PRICE BY ID
// =========================== */
// router.get(
//   "/:id",
//   authenticate,
//   (req, res) => {
//     /*
//       #swagger.tags = ['Sales Customer Price']
//       #swagger.summary = 'Get sales customer price by ID'
//       #swagger.security = [{ "bearerAuth": [] }]
//     */

//     salesCustomerPriceController.getSalesCustomerPriceById(req, res);
//   }
// );

// /* ===========================
//    ✅ DELETE SALES CUSTOMER PRICE
// =========================== */
// router.delete(
//   "/:id",
//   authenticate,
//   (req, res) => {
//     /*
//       #swagger.tags = ['Sales Customer Price']
//       #swagger.summary = 'Delete sales customer price (soft delete)'
//       #swagger.security = [{ "bearerAuth": [] }]
//     */

//     salesCustomerPriceController.deleteSalesCustomerPrice(req, res);
//   }
// );

// module.exports = router;


const express = require("express");
const router = express.Router();

const salesCustomerPriceController = require("../../controllers/sales/salesCustomerPriceController");
const authenticate = require("../../middlewares/authenticate");

/**
 * @swagger
 * tags:
 *   name: Sales Customer Price
 *   description: Sales customer price creation, listing, update and deletion APIs
 */

/* ===========================
   ✅ CREATE SALES CUSTOMER PRICE
=========================== */
router.post(
  "/create",
  authenticate,
  (req, res) => {
    /*
      #swagger.tags = ['Sales Customer Price']
      #swagger.summary = 'Create sales customer price'
      #swagger.security = [{ "bearerAuth": [] }]
    */

    salesCustomerPriceController.createSalesCustomerPrice(req, res);
  }
);

/* ===========================
   ✅ UPDATE SALES CUSTOMER PRICE
=========================== */
router.patch(
  "/:id",
  authenticate,
  (req, res) => {
    /*
      #swagger.tags = ['Sales Customer Price']
      #swagger.summary = 'Patch update sales customer price by ID'
      #swagger.security = [{ "bearerAuth": [] }]
    */

    salesCustomerPriceController.updateSalesCustomerPrice(req, res);
  }
);

/* ===========================
   ✅ GET ALL SALES CUSTOMER PRICES
=========================== */
router.get(
  "/all",
  authenticate,
  (req, res) => {
    /*
      #swagger.tags = ['Sales Customer Price']
      #swagger.summary = 'Get all sales customer prices'
      #swagger.security = [{ "bearerAuth": [] }]
    */

    salesCustomerPriceController.getSalesCustomerPrices(req, res);
  }
);

/* ===========================
   ✅ GET SALES CUSTOMER PRICE BY ID
=========================== */
router.get(
  "/:id",
  authenticate,
  (req, res) => {
    /*
      #swagger.tags = ['Sales Customer Price']
      #swagger.summary = 'Get sales customer price by ID'
      #swagger.security = [{ "bearerAuth": [] }]
    */

    salesCustomerPriceController.getSalesCustomerPriceById(req, res);
  }
);

/* ===========================
   ✅ DELETE SALES CUSTOMER PRICE
=========================== */
router.delete(
  "/:id",
  authenticate,
  (req, res) => {
    /*
      #swagger.tags = ['Sales Customer Price']
      #swagger.summary = 'Delete sales customer price (soft delete)'
      #swagger.security = [{ "bearerAuth": [] }]
    */

    salesCustomerPriceController.deleteSalesCustomerPrice(req, res);
  }
);

module.exports = router;