Deuteronomy 20:11

Amplified Bible (AMP)
If that city accepts your terms of peace and opens its gates to you, then all the people who are found in it shall become your forced labor and shall serve you.

Read Deuteronomy 20:11 in other translations