<?php

namespace app\controller\api\v1;

use support\Request;
use hg\apidoc\annotation as Apidoc;

use App\Utils\ApiResponse;

use App\model\Withdraw;
// use App\dao\UserDao;

/**
 * @Apidoc\Title("提现管理")
 */
class WithdrawController
{  
     /**
     * @Apidoc\Title("查找所有提现记录")
     * @Apidoc\Url("/api/v1/withdraw/lists")
     * @Apidoc\Param(name="black", type="string", desc="是否黑户", required=false)
     * @Apidoc\Param(name="username", type="string", desc="账号", required=false)
     * @Apidoc\Method("POST")
     */
    public function lists(Request $request)
    {
        //根据id查找用户
        $db = Withdraw::all();
        //操作不成功
        if (!$db) {
            return ApiResponse::error (402, '操作失败');
        }
        return ApiResponse::success (200, $db );
    }
}
