1234567891011121314151617181920 |
- import { Application, Context } from '@midwayjs/koa';
- import { App, Inject } from '@midwayjs/decorator';
- /**
- * controller基类,有一些基础函数需要实现
- */
- export abstract class BaseController {
- @App()
- app: Application;
- @Inject()
- ctx: Context;
- abstract query(...args);
- abstract fetch(...args);
- abstract update(...args);
- abstract updateMany(...args);
- abstract delete(...args);
- abstract deleteMany(...args);
- abstract create(...args);
- abstract createMany(...args);
- }
|