package site.ruiqiao.renrentou.service;

import java.util.Map;

import io.reactivex.Flowable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import site.ruiqiao.renrentou.model.ResponseDto;
import site.ruiqiao.renrentou.model.User;

/**
 * @author ruiqiao
 * @project Renrentou
 * @package site.ruiqiao.renrentou.service
 * @date 2017/9/9
 * @des
 */

public interface RegService{
    @POST("user/regist/person")
    @Multipart
    Flowable<ResponseDto<User>> regPerson(
            @PartMap Map<String, RequestBody> param,
            @Part MultipartBody.Part front,
            @Part MultipartBody.Part back
    );

    @POST("user/regist/company")
    @Multipart
    Flowable<ResponseDto<User>> regCompany(
            @PartMap Map<String, RequestBody> param,
            @Part MultipartBody.Part front
    );
}