package com.xindazhou.user.convert.auth;

import com.xindazhou.user.controller.app.auth.vo.*;
import com.xindazhou.user.controller.app.social.vo.AppSocialUserUnbindReqVO;
import com.xindazhou.user.controller.app.user.vo.AppMemberUserResetPasswordReqVO;
import com.xindazhou.framework.common.biz.system.oauth2.dto.OAuth2AccessTokenRespDTO;
import com.xindazhou.business.api.sms.dto.code.SmsCodeSendReqDTO;
import com.xindazhou.business.api.sms.dto.code.SmsCodeUseReqDTO;
import com.xindazhou.business.api.sms.dto.code.SmsCodeValidateReqDTO;
import com.xindazhou.framework.social.core.dto.SocialUserBindReqDTO;
import com.xindazhou.framework.social.core.dto.SocialUserUnbindReqDTO;
import com.xindazhou.framework.social.core.dto.SocialWxJsapiSignatureRespDTO;
import com.xindazhou.business.enums.sms.SmsSceneEnum;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface AuthConvert {

    AuthConvert INSTANCE = Mappers.getMapper(AuthConvert.class);

    SocialUserBindReqDTO convert(Long userId, Integer userType, AppAuthSocialLoginReqVO reqVO);
    SocialUserUnbindReqDTO convert(Long userId, Integer userType, AppSocialUserUnbindReqVO reqVO);

    SmsCodeSendReqDTO convert(AppAuthSmsSendReqVO reqVO);
    SmsCodeUseReqDTO convert(AppMemberUserResetPasswordReqVO reqVO, SmsSceneEnum scene, String usedIp);
    SmsCodeUseReqDTO convert(AppAuthSmsLoginReqVO reqVO, Integer scene, String usedIp);

    AppAuthLoginRespVO convert(OAuth2AccessTokenRespDTO bean, String openid);

    SmsCodeValidateReqDTO convert(AppAuthSmsValidateReqVO bean);

    SocialWxJsapiSignatureRespDTO convert(SocialWxJsapiSignatureRespDTO bean);

}
