package com.jojubanking.boot.module.system.convert.auth;

import com.jojubanking.boot.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO;
import com.jojubanking.boot.module.system.controller.app.auth.vo.AppAuthLoginRespVO;
import com.jojubanking.boot.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-12-05T11:32:08+0800",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_201 (Oracle Corporation)"
)
public class AuthGzConvertImpl implements AuthGzConvert {

    @Override
    public AppAuthLoginRespVO convert(OAuth2AccessTokenDO bean) {
        if ( bean == null ) {
            return null;
        }

        AppAuthLoginRespVO appAuthLoginRespVO = new AppAuthLoginRespVO();

        appAuthLoginRespVO.setUserId( bean.getUserId() );
        appAuthLoginRespVO.setAccessToken( bean.getAccessToken() );
        appAuthLoginRespVO.setRefreshToken( bean.getRefreshToken() );
        appAuthLoginRespVO.setExpiresTime( bean.getExpiresTime() );

        return appAuthLoginRespVO;
    }

    @Override
    public AppAuthLoginRespVO convert(OAuth2AccessTokenRespDTO bean) {
        if ( bean == null ) {
            return null;
        }

        AppAuthLoginRespVO appAuthLoginRespVO = new AppAuthLoginRespVO();

        appAuthLoginRespVO.setUserId( bean.getUserId() );
        appAuthLoginRespVO.setAccessToken( bean.getAccessToken() );
        appAuthLoginRespVO.setRefreshToken( bean.getRefreshToken() );
        appAuthLoginRespVO.setExpiresTime( bean.getExpiresTime() );

        return appAuthLoginRespVO;
    }
}
