<?php

namespace app\adminapi\service\finance;

use app\common\model\users\UsersLog as UsersLogModel;

/**
 * @package app\adminapi\service\finance
 * @class Fund
 * @author xzncit 2024/4/13
 */
class Fund {

    public static function getList($params=[]){
        $array           = [];
        $array["total"]  = UsersLogModel::count();
        $array["list"]   = UsersLogModel::order("id","desc")->page($params["current"]??1,$params["size"]??10)->select()->map(function ($res){
            $res["username"] = getUserName($res["user_id"]);
            return $res;
        });
        return $array;
    }

}