cool-admin-midway/.vscode/service.code-snippets

28 lines
663 B
Plaintext
Raw Normal View History

2022-03-14 14:46:21 +08:00
{
"service": {
"prefix": "service",
"body": [
"import { Provide } from '@midwayjs/decorator';",
"import { BaseService } from '@cool-midway/core';",
2023-03-08 15:36:37 +08:00
"import { InjectEntityModel } from '@midwayjs/typeorm';",
2022-03-14 14:46:21 +08:00
"import { Repository } from 'typeorm';",
"",
"/**",
" * 描述",
" */",
"@Provide()",
"export class XxxService extends BaseService {",
" @InjectEntityModel(实体)",
" xxxEntity: Repository<实体>;",
"",
" /**",
" * 描述",
" */",
" async xxx() {}",
"}",
""
],
"description": "cool-admin service代码片段"
}
}