Generate model and controller