package com.kotlin.user.data.respository

import com.cooleshow.base.data.net.BaseResponse
import com.cooleshow.base.data.net.RetrofitFactory
import com.cooleshow.usercenter.data.api.UserApi
import com.cooleshow.usercenter.data.protocol.RegisterReq

import io.reactivex.rxjava3.core.Observable

/*
    用户相关数据层
 */
class UserRepository constructor(){
    /*
        用户注册
     */
    fun register(mobile:String,pwd:String,verifyCode:String): Observable<BaseResponse<String>> {
        return RetrofitFactory.instance.create(UserApi::class.java).register(RegisterReq(mobile,pwd,verifyCode))
    }

    /*
        用户登录
     */
//    fun login(mobile:String,pwd:String,pushId:String): Observable<BaseResponse<UserInfo>> {
//        return RetrofitFactory.instance.create(UserApi::class.java).login(LoginReq(mobile,pwd,pushId))
//    }
    /*
   //        忘记密码
   //     */
//    fun forgetPwd(mobile:String,verifyCode:String): Observable<BaseResp<String>>{
//        return RetrofitFactory.instance.create(UserApi::class.java).forgetPwd(ForgetPwdReq(mobile,verifyCode))
//    }
//
//    /*
//        重置密码
//     */
//    fun resetPwd(mobile:String,pwd:String): Observable<BaseResp<String>>{
//        return RetrofitFactory.instance.create(UserApi::class.java).resetPwd(ResetPwdReq(mobile,pwd))
//    }
//
//    /*
//        编辑用户资料
//     */
//    fun editUser(userIcon:String,userName:String,userGender:String,userSign:String):Observable<BaseResp<UserInfo>>{
//        return RetrofitFactory.instance.create(UserApi::class.java).editUser(EditUserReq(userIcon,userName,userGender,userSign))
//    }
//
}
