generate code for model user