Generate scoped sequential IDs for ActiveRecord models