id を post_id にエイリアス化すれば、うまく機能します。 例:
id
post_id
SELECT id AS post_id FROM posts ORDER BY created_at DESC