class ApiEndpoints {
  // Auth Service 2.0
  // Kong路由: /api/v2/auth -> strip_path: true -> http://auth-service:3024/api/v2
  // 例如: /api/v2/auth/login -> strip /api/v2/auth -> /login -> 转发到 /api/v2/login
  static const String sendSms = '/api/v2/auth/sms/send';
  static const String verifySms = '/api/v2/auth/sms/verify';
  static const String register = '/api/v2/auth/register';
  static const String login = '/api/v2/auth/login';
  static const String loginSms = '/api/v2/auth/login-sms';
  static const String refreshToken = '/api/v2/auth/refresh';
  static const String logout = '/api/v2/auth/logout';
  static const String userProfile = '/api/v2/auth/user/profile';
  static const String resetPassword = '/api/v2/auth/password/reset';
  static const String changePassword = '/api/v2/auth/password/change';

  // 支付密码 (Trade Password)
  static const String tradePasswordStatus = '/api/v2/auth/trade-password/status';
  static const String tradePasswordSet = '/api/v2/auth/trade-password/set';
  static const String tradePasswordChange = '/api/v2/auth/trade-password/change';
  static const String tradePasswordVerify = '/api/v2/auth/trade-password/verify';

  // Capability endpoints (Auth Service)
  static const String userCapabilities = '/api/v2/auth/user/capabilities';

  // Mining Service 2.0 (Kong路由: /api/v2/mining)
  static String shareAccount(String accountSequence) =>
      '/api/v2/mining/accounts/$accountSequence';
  static String miningRecords(String accountSequence) =>
      '/api/v2/mining/accounts/$accountSequence/records';
  static String batchMiningRecords(String accountSequence) =>
      '/api/v2/mining/admin/batch-mining/records/$accountSequence';
  static const String globalState = '/api/v2/mining/global-state';
  static String realtimeEarning(String accountSequence) =>
      '/api/v2/mining/accounts/$accountSequence/realtime';

  // Trading Service 2.0 (Kong路由: /api/v2/trading)
  // Price endpoints
  static const String currentPrice = '/api/v2/trading/price/current';
  static const String latestPrice = '/api/v2/trading/price/latest';
  static const String priceHistory = '/api/v2/trading/price/history';
  static const String priceKlines = '/api/v2/trading/price/klines';

  // Trading admin endpoints
  static const String buyEnabled = '/api/v2/trading/admin/trading/buy-enabled';

  // Trading account endpoints
  static String tradingAccount(String accountSequence) =>
      '/api/v2/trading/trading/accounts/$accountSequence';
  static const String orderBook = '/api/v2/trading/trading/orderbook';
  static const String createOrder = '/api/v2/trading/trading/orders';
  static const String orders = '/api/v2/trading/trading/orders';
  static const String trades = '/api/v2/trading/trading/trades';
  static String cancelOrder(String orderNo) =>
      '/api/v2/trading/trading/orders/$orderNo/cancel';

  // Asset endpoints
  static const String myAsset = '/api/v2/trading/asset/my';
  static String accountAsset(String accountSequence) =>
      '/api/v2/trading/asset/account/$accountSequence';
  static const String estimateSell = '/api/v2/trading/asset/estimate-sell';
  static const String marketOverview = '/api/v2/trading/asset/market';
  static const String sellRestriction = '/api/v2/trading/asset/sell-restriction';

  // Transfer endpoints (内部划转)
  static const String transferIn = '/api/v2/trading/transfers/in';
  static const String transferOut = '/api/v2/trading/transfers/out';
  static const String transferHistory = '/api/v2/trading/transfers/history';

  // P2P Transfer endpoints (用户间转账)
  static const String p2pTransfer = '/api/v2/trading/p2p/transfer';
  static const String p2pTransferFeeConfig = '/api/v2/trading/p2p/transfer-fee-config';
  static String p2pTransferHistory(String accountSequence) =>
      '/api/v2/trading/p2p/transfers/$accountSequence';
  static const String lookupAccount = '/api/v2/auth/user/lookup';

  // C2C Trading endpoints (场外交易)
  static const String c2cOrders = '/api/v2/trading/c2c/orders';
  static const String c2cMyOrders = '/api/v2/trading/c2c/orders/my';
  static String c2cOrderDetail(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo';
  static String c2cTakeOrder(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo/take';
  static String c2cCancelOrder(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo/cancel';
  static String c2cConfirmPayment(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo/confirm-payment';
  static String c2cConfirmReceived(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo/confirm-received';
  static String c2cUploadProof(String orderNo) => '/api/v2/trading/c2c/orders/$orderNo/upload-proof';

  // Contribution Service 2.0 (Kong路由: /api/v2/contribution -> /api/v1/contributions)
  static const String contributionStats = '/api/v2/contribution/stats';
  static String contribution(String accountSequence) =>
      '/api/v2/contribution/accounts/$accountSequence';
  static String contributionRecords(String accountSequence) =>
      '/api/v2/contribution/accounts/$accountSequence/records';

  // Planting Ledger (Kong路由: /api/v2/contribution)
  static String plantingLedger(String accountSequence) =>
      '/api/v2/contribution/accounts/$accountSequence/planting-ledger';

  // Mining Wallet Service 2.0 (Kong路由: /api/v2/mining-wallet)
  static const String sharePoolBalance = '/api/v2/mining-wallet/pool-accounts/share-pool-balance';

  // Team Tree (Contribution Service 2.0)
  static String teamInfo(String accountSequence) =>
      '/api/v2/contribution/accounts/$accountSequence/team';
  static String teamDirectReferrals(String accountSequence) =>
      '/api/v2/contribution/accounts/$accountSequence/team/direct-referrals';
}
