Merge branch 'master' into greenkeeper/husky-1.0.0

This commit is contained in:
Kononnable 2018-10-01 20:32:04 +02:00 committed by GitHub
commit 69ece49f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,12 +4,11 @@ import {Index,Entity, PrimaryColumn, PrimaryGeneratedColumn, Column, OneToOne, O
@Entity("{{EntityName}}"{{#Schema}},{schema:"{{.}}"}{{/Schema}})
{{#Indexes}}{{^isPrimaryKey}}@Index("{{name}}",[{{#columns}}"{{name}}",{{/columns}}]{{#isUnique}},{unique:true}{{/isUnique}})
{{#Indexes}}{{^isPrimaryKey}}@Index("{{name}}",[{{#columns}}"{{toPropertyName name}}",{{/columns}}]{{#isUnique}},{unique:true}{{/isUnique}})
{{/isPrimaryKey}}{{/Indexes}}export class {{toEntityName EntityName}} {
{{#Columns}}
{{^relations}}{{#is_generated}} @PrimaryGeneratedColumn({
{{/is_generated}}{{^is_generated}} @Column("{{sql_type}}",{ {{#is_nullable}}
{{^relations}}{{#is_generated}} @PrimaryGeneratedColumn({ {{/is_generated}}{{^is_generated}} @Column("{{sql_type}}",{ {{#is_nullable}}
nullable:true,{{/is_nullable}}{{^is_nullable}}
nullable:false,{{/is_nullable}}{{#isPrimary}}
primary:{{isPrimary}},{{/isPrimary}}{{/is_generated}}{{#is_unique}}