static function object2array($obj)
    {
        $arr = [];
        foreach ($obj as $key => $value) {
            $arr[$key] = is_object($value) ? static::object2array($value) : $value;
        }
        return $arr;
    }