add prefix and suffix to objc model

This commit is contained in:
wing328
2016-02-28 16:15:44 +08:00
parent dfa977627a
commit 17a93dd5ce

View File

@@ -343,7 +343,15 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
}
// custom classes
else {
return classPrefix + camelize(type);
if (!StringUtils.isEmpty(modelNameSuffix)) { // set model suffix
type = type + "_" + modelNameSuffix;
}
if (!StringUtils.isEmpty(modelNamePrefix)) { // set model prefix
type = modelNamePrefix + "_" + type;
}
return classPrefix + camelize(type); // add class prefix
}
}