From 31aa47a1c09b773036833e9d208ef7a5c084fbb7 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Mon, 15 Aug 2022 21:48:37 +0530 Subject: [PATCH] fix: convert instructions model name to pascalcase Fixes: #204 --- instructions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instructions.ts b/instructions.ts index d6f4977..1e12dc2 100644 --- a/instructions.ts +++ b/instructions.ts @@ -398,7 +398,7 @@ export default async function instructions( const modelName = await getModelName(sink) state.modelName = modelName.replace(/(\.ts|\.js)$/, '') state.usersTableName = string.pluralize(string.snakeCase(state.modelName)) - state.modelReference = string.camelCase(state.modelName) + state.modelReference = string.pascalCase(string.singularize(state.modelName)) state.modelNamespace = `${app.namespacesMap.get('models') || 'App/Models'}/${state.modelName}` } else { state.usersTableName = await getTableName(sink)