"use strict";
import {
    controller,
    StaticController,
    get, model,
    IRequest,
    IResponse, Util, Controller
} from '@appolo/route';
import {IEnv} from "../../config/env/IEnv";
import {inject, define, singleton, override, lazy} from '@appolo/inject';
import {pipelineType, IPipeline, PipelineContext} from '@appolo/engine';
import {App} from '../../../../index';


@define()
@singleton()
export class TestPipeline implements IPipeline {

    constructor(@inject() private app: App, @inject() private env: IEnv) {
    }

    run(context: PipelineContext, next: () => Promise<any>) 


}


@controller("pipeline")
@singleton()
@pipelineType(TestPipeline)
export class PipelineTypeRouteController extends StaticController {


}







{

        let route = this.app.discovery.createRoute(context.type, "testPipeline")

        route.path("/aaa")

        model()(context.type.prototype, "testPipeline", 0)

        context.type.prototype["testPipeline"] = function (this: Controller, model) {
            return model
        }

        return next();
    }