Optimal investment-consumption strategy in a discrete-time model with regime switching