diff --git a/generation/templates/service.tmpl b/generation/templates/service.tmpl index 96ab790..8185486 100644 --- a/generation/templates/service.tmpl +++ b/generation/templates/service.tmpl @@ -33,7 +33,7 @@ export default class {{.ModelName}}Service implements IService<{{.ModelName}}> { return await SearchByAllTextFields(input) as {{ .ModelName }}[] } - async sort(options: SortOptions) { + async sort(options: SortOptions<{{ .ModelName }}>) { return (await SortedByOrder( Object.entries(options).map((item) => { if (item[1] !== 'NONE') { @@ -43,7 +43,6 @@ export default class {{.ModelName}}Service implements IService<{{.ModelName}}> { }) } }).filter(item => !!item) - )) as Task[]; + )) as {{ .ModelName }}[]; } -} } \ No newline at end of file