-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
442 additions
and
120 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
...in/layer/src/generators/entity/files/data-source/lib/dtos/create-__fileName__.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import {Create<%=className%>} from '<%=domain%>' | ||
import {ApiProperty} from '@nestjs/swagger' | ||
import {IsNotEmpty, IsString} from 'class-validator' | ||
import {IsNotEmpty} from 'class-validator' | ||
|
||
export class Create<%=className%>Dto implements Create<%=className%> { | ||
<% for(let prop of entity.props) if (!['id','createdAt','updatedAt'].includes(prop.name)) { %> | ||
@ApiProperty() | ||
@IsString({message: 'o nome deve ser uma string'}) | ||
@IsNotEmpty({message: 'por favor, preencha o nome'}) | ||
name: string | ||
@IsNotEmpty({message: 'por favor, preencha o <%= prop.name %>'}) | ||
<%= prop.name %>: <%= prop.type %> | ||
<% } %> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
.../plugin/layer/src/generators/entity/files/domain/lib/dtos/create-__fileName__.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export interface Create<%= className %> { | ||
name: string | ||
<% for(let prop of entity.props) { %> | ||
<% if (!['id','createdAt','updatedAt'].includes(prop.name)) { %> | ||
<%= prop.name %>: <%= prop.type %> | ||
<% } %> | ||
<% } %> | ||
} |
6 changes: 0 additions & 6 deletions
6
tools/plugin/layer/src/generators/entity/files/domain/lib/entities/__fileName__.ts.template
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
...files/feature/lib/components/create-__fileName__/create-__fileName__.dialog.html.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
...files/feature/lib/components/update-__fileName__/update-__fileName__.dialog.html.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.