forked from brocoders/nestjs-boilerplate
-
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
1 parent
23ad8af
commit 2e1319a
Showing
67 changed files
with
697 additions
and
181 deletions.
There are no files selected for viewing
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,7 +1,6 @@ | ||
--- | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
--- | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
// import { Allow } from 'class-validator'; | ||
|
||
export class Create<%= name %>Dto {} | ||
export class Create<%= name %>Dto { | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
} |
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,7 +1,6 @@ | ||
--- | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
--- | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
// import { Allow } from 'class-validator'; | ||
|
||
export class Create<%= name %>Dto {} | ||
export class Create<%= name %>Dto { | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
} |
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,7 +1,6 @@ | ||
--- | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
--- | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
// import { Allow } from 'class-validator'; | ||
|
||
export class Create<%= name %>Dto {} | ||
export class Create<%= name %>Dto { | ||
// Don't forget to use the class-validator decorators in the DTO properties. | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/domain/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.ts | ||
after: export class <%= name %> { | ||
--- | ||
|
||
@ApiProperty() | ||
<%= property %>: <%= 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
after: export class Create<%= name %>Dto | ||
--- | ||
|
||
<% if (isAddToDto) { -%> | ||
@ApiProperty() | ||
<% if (type === 'string') { -%> | ||
@IsString() | ||
<% } -%> | ||
<% if (type === 'number') { -%> | ||
@IsNumber() | ||
<% } -%> | ||
<% if (type === 'boolean') { -%> | ||
@IsBoolean() | ||
<% } -%> | ||
<%= property %>: <%= type %>; | ||
<% } -%> |
11 changes: 11 additions & 0 deletions
11
.hygen/property/add-to-all-db/dto/02-create-import-class-validator.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: export class Create<%= name %>Dto | ||
skip_if: "} from 'class-validator'" | ||
--- | ||
<% if (isAddToDto) { -%> | ||
import { | ||
// decorators here | ||
} from 'class-validator'; | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-all-db/dto/03-create-boolean.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsBoolean, | ||
--- | ||
<% if (isAddToDto && type === 'boolean') { -%> | ||
IsBoolean, | ||
<% } -%> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsNumber, | ||
--- | ||
<% if (isAddToDto && type === 'number') { -%> | ||
IsNumber, | ||
<% } -%> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsString, | ||
--- | ||
<% if (isAddToDto && type === 'string') { -%> | ||
IsString, | ||
<% } -%> |
11 changes: 11 additions & 0 deletions
11
.hygen/property/add-to-all-db/dto/06-create-import-swagger.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: export class Create<%= name %>Dto | ||
skip_if: "} from '@nestjs/swagger'" | ||
--- | ||
<% if (isAddToDto) { -%> | ||
import { | ||
// decorators here | ||
} from '@nestjs/swagger'; | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-all-db/dto/07-create-api-property.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from '@nestjs/swagger'" | ||
skip_if: \ApiProperty, | ||
--- | ||
<% if (isAddToDto) { -%> | ||
ApiProperty, | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-all-db/infrastructure/persistence/document/entities/schema.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/entities/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.schema.ts | ||
after: export class <%= name %>SchemaClass | ||
--- | ||
|
||
@ApiProperty() | ||
@Prop() | ||
<%= property %>: <%= type %>; |
6 changes: 6 additions & 0 deletions
6
...en/property/add-to-all-db/infrastructure/persistence/document/mappers/mapper-domain.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>\(\) | ||
--- | ||
domainEntity.<%= property %> = raw.<%= property %>; |
6 changes: 6 additions & 0 deletions
6
...operty/add-to-all-db/infrastructure/persistence/document/mappers/mapper-persistence.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>SchemaClass\(\) | ||
--- | ||
persistenceSchema.<%= property %> = domainEntity.<%= property %>; |
7 changes: 7 additions & 0 deletions
7
...property/add-to-all-db/infrastructure/persistence/relational/entities/entity-column.ejs.t
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/relational/entities/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.entity.ts | ||
before: from \'typeorm\' | ||
skip_if: \sColumn, | ||
--- | ||
Column, |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-all-db/infrastructure/persistence/relational/entities/entity.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/relational/entities/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.entity.ts | ||
after: export class <%= name %>Entity | ||
--- | ||
|
||
@ApiProperty() | ||
@Column() | ||
<%= property %>: <%= type %>; |
6 changes: 6 additions & 0 deletions
6
.../property/add-to-all-db/infrastructure/persistence/relational/mappers/mapper-domain.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/relational/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>\(\) | ||
--- | ||
domainEntity.<%= property %> = raw.<%= property %>; |
6 changes: 6 additions & 0 deletions
6
...erty/add-to-all-db/infrastructure/persistence/relational/mappers/mapper-persistence.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/relational/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>Entity\(\) | ||
--- | ||
persistenceEntity.<%= property %> = domainEntity.<%= property %>; |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module.exports = [ | ||
{ | ||
type: 'input', | ||
name: 'name', | ||
message: "Entity name (e.g. 'User')", | ||
validate: (input) => { | ||
if (!input.trim()) { | ||
return 'Entity name is required'; | ||
} | ||
|
||
return true; | ||
}, | ||
format: (input) => { | ||
return input.trim(); | ||
}, | ||
}, | ||
{ | ||
type: 'input', | ||
name: 'property', | ||
message: "Property name (e.g. 'firstName')", | ||
validate: (input) => { | ||
if (!input.trim()) { | ||
return 'Property name is required'; | ||
} | ||
|
||
return true; | ||
}, | ||
format: (input) => { | ||
return input.trim(); | ||
}, | ||
}, | ||
{ | ||
type: 'select', | ||
name: 'type', | ||
choices: ['string', 'number', 'boolean'], | ||
}, | ||
{ | ||
type: 'confirm', | ||
name: 'isAddToDto', | ||
message: 'Add to DTO?', | ||
initial: true, | ||
}, | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/domain/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.ts | ||
after: export class <%= name %> { | ||
--- | ||
|
||
@ApiProperty() | ||
<%= property %>: <%= 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
after: export class Create<%= name %>Dto | ||
--- | ||
|
||
<% if (isAddToDto) { -%> | ||
@ApiProperty() | ||
<% if (type === 'string') { -%> | ||
@IsString() | ||
<% } -%> | ||
<% if (type === 'number') { -%> | ||
@IsNumber() | ||
<% } -%> | ||
<% if (type === 'boolean') { -%> | ||
@IsBoolean() | ||
<% } -%> | ||
<%= property %>: <%= type %>; | ||
<% } -%> |
11 changes: 11 additions & 0 deletions
11
.hygen/property/add-to-document/dto/02-create-import-class-validator.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: export class Create<%= name %>Dto | ||
skip_if: "} from 'class-validator'" | ||
--- | ||
<% if (isAddToDto) { -%> | ||
import { | ||
// decorators here | ||
} from 'class-validator'; | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-document/dto/03-create-boolean.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsBoolean, | ||
--- | ||
<% if (isAddToDto && type === 'boolean') { -%> | ||
IsBoolean, | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-document/dto/04-create-number.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsNumber, | ||
--- | ||
<% if (isAddToDto && type === 'number') { -%> | ||
IsNumber, | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-document/dto/05-create-string.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from 'class-validator'" | ||
skip_if: \IsString, | ||
--- | ||
<% if (isAddToDto && type === 'string') { -%> | ||
IsString, | ||
<% } -%> |
11 changes: 11 additions & 0 deletions
11
.hygen/property/add-to-document/dto/06-create-import-swagger.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: export class Create<%= name %>Dto | ||
skip_if: "} from '@nestjs/swagger'" | ||
--- | ||
<% if (isAddToDto) { -%> | ||
import { | ||
// decorators here | ||
} from '@nestjs/swagger'; | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-document/dto/07-create-api-property.dto.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/dto/create-<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.dto.ts | ||
before: "} from '@nestjs/swagger'" | ||
skip_if: \ApiProperty, | ||
--- | ||
<% if (isAddToDto) { -%> | ||
ApiProperty, | ||
<% } -%> |
9 changes: 9 additions & 0 deletions
9
.hygen/property/add-to-document/infrastructure/persistence/document/entities/schema.ejs.t
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/entities/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.schema.ts | ||
after: export class <%= name %>SchemaClass | ||
--- | ||
|
||
@ApiProperty() | ||
@Prop() | ||
<%= property %>: <%= type %>; |
6 changes: 6 additions & 0 deletions
6
.../property/add-to-document/infrastructure/persistence/document/mappers/mapper-domain.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>\(\) | ||
--- | ||
domainEntity.<%= property %> = raw.<%= property %>; |
6 changes: 6 additions & 0 deletions
6
...erty/add-to-document/infrastructure/persistence/document/mappers/mapper-persistence.ejs.t
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
inject: true | ||
to: src/<%= h.inflection.transform(name, ['pluralize', 'underscore', 'dasherize']) %>/infrastructure/persistence/document/mappers/<%= h.inflection.transform(name, ['underscore', 'dasherize']) %>.mapper.ts | ||
after: new <%= name %>SchemaClass\(\) | ||
--- | ||
persistenceSchema.<%= property %> = domainEntity.<%= property %>; |
Oops, something went wrong.