<?php

use Api\PhpServices\Idgen\Idgen;
use Yaf\Controller_Abstract;

/**
 * 不要删除默认的控制器，deploy等服务会调用此/indix/index接口，判断项目是否可用
 */
class IndexController extends Controller_Abstract
{
    use \Helpers\ApiResponse;

    public function IndexAction() {

        $res = Idgen::get(appConfig('idgen.partner'),appConfig('idgen.key'), [], [[
            "type" => "55c768",
            'number'=>12,
            "count"=> 1]]);
        $id = $res['id_datetime']['55c768'] ?? [];
        $this->success(['id'=>$id]);
    }

    public function orderAction() {

        $ret = [
            'id'=>'aa',
        ];

        $this->success($ret);

    }
}
