import betterproto
from game_server.net.session import Session
from lib.proto import (
    GetPrivilegeInfoReq,
    GetPrivilegeInfoRsp,
    PrivilegeInfo,
    PrivilegeRightInfo
)

async def handle(session: Session, msg: GetPrivilegeInfoReq) -> betterproto.Message:
    return GetPrivilegeInfoRsp(
        retcode=0,
        privilege_list=[
            PrivilegeInfo(
                expire_time=1734001367,
                privilege_id=6,
                right_info_list=[
                    PrivilegeRightInfo(
                        max_use_times=10,
                        next_auto_refresh_time=1730145600,
                        right_id=4,
                        type=1
                    )
                ]
            ),
            PrivilegeInfo(
                expire_time=1668139199,
                privilege_id=19,
                right_info_list=[
                    PrivilegeRightInfo(
                        max_use_times=10,
                        next_auto_refresh_time=1730145600,
                        right_id=17,
                        total_used_times=10,
                        type=4
                    )
                ]
            ),
            PrivilegeInfo(
                expire_time=1685678400,
                privilege_id=23,
                right_info_list=[
                    PrivilegeRightInfo(
                        max_use_times=10,
                        next_auto_refresh_time=1730145600,
                        right_id=21,
                        total_used_times=10,
                        type=4
                    )
                ]
            ),
            PrivilegeInfo(
                expire_time=1700798399,
                privilege_id=25,
                right_info_list=[
                    PrivilegeRightInfo(
                        max_use_times=10,
                        next_auto_refresh_time=1730145600,
                        right_id=23,
                        total_used_times=10,
                        type=4
                    )
                ]
            ),
            PrivilegeInfo(
                expire_time=1731643200,
                privilege_id=34,
                right_info_list=[
                    PrivilegeRightInfo(
                        max_use_times=10,
                        next_auto_refresh_time=1730145600,
                        right_id=32,
                        type=4
                    )
                ]
            ),
        ]
    )
