a code gen for model class