const express = require('express');
const db = require('../db');
const { authenticate, requireAdmin } = require('../middleware/auth');

const router = express.Router();

router.get('/', (req, res) => {
  res.json({
    success: true,
    message: '公司财务管理系统 API',
    version: '1.0.0',
    timestamp: new Date().toISOString(),
    endpoints: {
      upload: "/api/upload",
      health: '/api/health',
      auth: '/api/auth',
      customers: '/api/customers',
      suppliers: '/api/suppliers',
      projects: '/api/projects',
      products: '/api/products',
      payment_nodes: '/api/payment-nodes',
      payment_records: '/api/payment-records',
      exchange_rates: '/api/exchange-rates',
      advances: '/api/advances',
      reimbursements: '/api/reimbursements',
      purchase_requests: '/api/purchase-requests',
      inventory: '/api/inventory',
      finance_stats: '/api/finance-stats'
    }
  });
});


module.exports = router;