Skip to content

Commit

Permalink
fixed(stub): issue where stub generates with non-default and trailing…
Browse files Browse the repository at this point in the history
… spaces
  • Loading branch information
tomgobich committed Sep 20, 2024
1 parent 137cc07 commit de6cb88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stubs/generate/model.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ #each model.imports as statement }}
{{ statement }}{{{ '\n' }}}
{{ /each }}
export default class {{ model.name }} extends BaseModel {{ '{' }}{{ #each model.columns as column }}
export default class {{ model.name }} extends BaseModel {{ '{' }}{{ #each model.columns as column, index }}
{{ column.getDecorator() }}
declare {{ column.name }}: {{ column.type }}{{ column.isNullable ? ' | null' : '' }}
{{ /each }}{{ #each model.relationships as relationship, index }}
declare {{ column.name }}: {{ column.type }}{{ column.isNullable ? ' | null' : '' }}{{ index + 1 < model.columns.length || model.relationships.length ? '\n' : '' }}
{{ /each }}{{ #each model.relationships as relationship, index }}
{{ relationship.decorator }}
{{{ relationship.property }}}{{ index + 1 < model.relationships.length ? '\n' : '' }}
{{ /each }}
Expand Down

0 comments on commit de6cb88

Please sign in to comment.