mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
28 lines
659 B
Plaintext
28 lines
659 B
Plaintext
{
|
|
"service": {
|
|
"prefix": "service",
|
|
"body": [
|
|
"import { Provide } from '@midwayjs/decorator';",
|
|
"import { BaseService } from '@cool-midway/core';",
|
|
"import { InjectEntityModel } from '@midwayjs/orm';",
|
|
"import { Repository } from 'typeorm';",
|
|
"",
|
|
"/**",
|
|
" * 描述",
|
|
" */",
|
|
"@Provide()",
|
|
"export class XxxService extends BaseService {",
|
|
" @InjectEntityModel(实体)",
|
|
" xxxEntity: Repository<实体>;",
|
|
"",
|
|
" /**",
|
|
" * 描述",
|
|
" */",
|
|
" async xxx() {}",
|
|
"}",
|
|
""
|
|
],
|
|
"description": "cool-admin service代码片段"
|
|
}
|
|
}
|