-- Indexes for admin User Detail tabs: Deposits and Withdrawals.
-- Deposits: GET /admin/users/{id}/payments — WHERE user_id = ? ORDER BY created_at DESC (default).
-- Withdrawals: GET /admin/users/{id}/payouts — WHERE user_id = ? AND type = 'CRYPTO' ORDER BY created_at DESC (default).

-- payments: optimize "list payments by user" with default sort by created_at
CREATE INDEX idx_payments_user_created_at ON payments(user_id, created_at);

-- payouts: optimize "list CRYPTO payouts by user" with default sort by created_at
CREATE INDEX idx_payouts_user_type_created_at ON payouts(user_id, type, created_at);
