Improve ORM templates; improve StaticClass typedef; bump version

This commit is contained in:
2022-04-04 14:45:45 -05:00
parent 25265b5560
commit f6a7cac05c
4 changed files with 10 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ const templateModel: Template = {
baseAppPath: ['models'],
description: 'Create a new class that represents a record in a database',
render: (name: string) => {
return `import {Injectable, Model} from "@extollo/lib"
return `import {Injectable, Model} from '@extollo/lib'
/**
* ${name} Model
@@ -18,8 +18,8 @@ const templateModel: Template = {
*/
@Injectable()
export class ${name} extends Model<${name}> {
protected static table = '${name.toLowerCase()}';
protected static key = '${name.toLowerCase()}_id';
protected static table = '${name.toLowerCase()}'
protected static key = '${name.toLowerCase()}_id'
}
`
},