# -*- coding: utf-8 -*-
def general_message(msg_show="",
                    msg="success",
                    code=100000,
                    bean=None,
                    list=None,
                    *args,
                    **kwargs):
    """通用响应信息"""
    return {
        "code": code,
        "msg": msg,
        "msg_show": msg_show,
        "data": dict(bean=bean or {}, list=list or [], *args, **kwargs),
        "count": kwargs.get("count"),
        "page_size": kwargs.get("page_size"),
        "page": kwargs.get("page")
    }


def error_message(msg=""):
    """错误响应信息"""
    return {"result": msg}
