/**
 * API 配置文件
 */

// API 基础地址配置
// 开发环境使用Vite代理，生产环境使用实际地址
export const API_BASE_URL = import.meta.env.DEV ? '' : 'http://115.190.125.125:8086'

// API 端点配置
export const API_ENDPOINTS = {
  // 认证相关
  LOGIN: '/admin/auth/login',
  LOGOUT: '/admin/auth/logout',
  GET_USER_INFO: '/admin/auth/userInfo',
  
  // 轮播图管理
  BANNER_LIST: '/admin/banner/list',
  BANNER_DETAIL: '/admin/banner/detail',
  BANNER_CREATE: '/admin/banner/create',
  BANNER_UPDATE: '/admin/banner/update',
  BANNER_DELETE: '/admin/banner/delete',
  BANNER_UPLOAD: '/admin/banner/upload',
  
  // 活动管理
  ACTIVITY_LIST: '/api/activity/list',
  ACTIVITY_DETAIL: '/api/activity/detail',
  ACTIVITY_CREATE: '/admin/activity/create',
  ACTIVITY_UPDATE: '/admin/activity/update',
  ACTIVITY_DELETE: '/admin/activity/delete',
  ACTIVITY_REGISTRATIONS: '/admin/activity/registrations',
  ACTIVITY_STATS: '/admin/activity/stats',
  
  // 红娘管理
  MATCHMAKER_LIST: '/api/matchmaker/list',
  MATCHMAKER_DETAIL: '/api/matchmaker/detail',
  MATCHMAKER_CREATE: '/api/matchmaker/create',
  MATCHMAKER_UPDATE: '/api/matchmaker/update',
  MATCHMAKER_DELETE: '/api/matchmaker/delete',
  MATCHMAKER_STATS: '/api/matchmaker/stats',
  
  // 课程管理
  COURSE_LIST: '/api/course/list',
  COURSE_DETAIL: '/api/course/detail',
  COURSE_CREATE: '/api/course/admin/create',
  COURSE_UPDATE: '/api/course/admin/update',
  COURSE_DELETE: '/api/course/admin/delete',
  
  // 成功案例管理
  CASE_LIST: '/api/case/list',
  CASE_DETAIL: '/api/case/detail',
  CASE_CREATE: '/api/case/create',
  CASE_UPDATE: '/api/case/update',
  CASE_DELETE: '/api/case/delete',
  CASE_TIMELINE: '/api/case/timeline',
  
  // 用户管理
  USER_LIST: '/admin/user/list',
  USER_DETAIL: '/admin/user/detail',
  USER_UPDATE: '/admin/user/update',
  USER_STATS: '/admin/user/stats',
  USER_VIP_LIST: '/admin/user/vip/list',
  
  // 动态管理
  DYNAMIC_LIST: '/admin/dynamic/list',
  DYNAMIC_DETAIL: '/admin/dynamic/detail',
  DYNAMIC_AUDIT: '/admin/dynamic/audit',
  DYNAMIC_DELETE: '/admin/dynamic/delete',

  // 举报管理（管理端）
  REPORT_LIST: '/admin/report/list',
  REPORT_DETAIL: '/admin/report/detail',
  REPORT_HANDLE: '/admin/report/handle',
  
  // 数据统计
  DASHBOARD_STATS: '/admin/dashboard/stats',
  DASHBOARD_RECENT_ACTIVITIES: '/admin/dashboard/recent-activities',
  DASHBOARD_USER_TREND: '/admin/dashboard/user-trend',
  DASHBOARD_ACTIVITY_TREND: '/admin/dashboard/activity-trend',
  DASHBOARD_REVENUE_TREND: '/admin/dashboard/revenue-trend',
  
  // 文件上传
  UPLOAD_IMAGE: '/admin/upload/image',
  UPLOAD_FILE: '/admin/upload/file'
}

// Redis 缓存键前缀
export const CACHE_KEYS = {
  ACTIVITY_LIST: 'admin:activity:list',
  BANNER_LIST: 'admin:banner:list',
  USER_STATS: 'admin:user:stats',
  DASHBOARD_STATS: 'admin:dashboard:stats'
}

// RabbitMQ 消息队列配置
export const MQ_QUEUES = {
  ACTIVITY_REGISTER: 'activity.register',
  USER_AUDIT: 'user.audit',
  DYNAMIC_AUDIT: 'dynamic.audit',
  DATA_STATS: 'data.stats'
}

