// src/routes/index.js
// API 라우트 인덱스

const express = require('express');
const authRoutes = require('./auth.routes');
const userRoutes = require('./user.routes');
const apiKeyRoutes = require('./api-key.routes');
const chatRoutes = require('./chat.routes');
const usageRoutes = require('./usage.routes');
const modelRoutes = require('./model.routes');
const adminRoutes = require('./admin.routes');

const router = express.Router();

// API 정보
router.get('/', (req, res) => {
  res.json({
    success: true,
    data: {
      name: 'AI Assistant API',
      version: '1.0.0',
      description: 'LLM API Platform - OpenAI 호환 API',
      endpoints: {
        auth: '/api/v1/auth',
        users: '/api/v1/users',
        apiKeys: '/api/v1/api-keys',
        chat: '/api/v1/chat',
        models: '/api/v1/models',
        usage: '/api/v1/usage',
      },
      documentation: 'https://docs.example.com',
    },
  });
});

// 라우트 등록
router.use('/auth', authRoutes);
router.use('/users', userRoutes);
router.use('/api-keys', apiKeyRoutes);
router.use('/chat', chatRoutes);
router.use('/models', modelRoutes);
router.use('/usage', usageRoutes);
router.use('/admin', adminRoutes);

module.exports = router;
