rename apply_id to apply_detail_id