package com.dahe.pass.net;


import com.dahe.mylibrary.bean.CarBean;
import com.dahe.mylibrary.bean.NodeBean;
import com.dahe.mylibrary.bean.StateBean;
import com.dahe.mylibrary.bean.VersionBean;
import com.dahe.mylibrary.net.CommonResponseBean;
import com.dahe.mylibrary.net.PagerBean;
import com.dahe.pass.BuildConfig;
import com.dahe.pass.bean.ApplyBean;
import com.dahe.pass.bean.ApplySendBean;
import com.dahe.pass.bean.BusInfoBean;
import com.dahe.pass.bean.CompanyBean;
import com.dahe.pass.bean.CompanyTypeBean;
import com.dahe.pass.bean.PassBean;
import com.dahe.pass.bean.UserBean;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import io.reactivex.rxjava3.core.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;


/**
 * Created by Administrator on 2018/8/8 0008.
 */

public interface Api {

    //    String BASE_URL = "https://tmstest.dahehuoyun.com/";
    String BASE_URL = BuildConfig.BASE_URL;


    //获取版本
    String VERSION = BASE_URL + "app/version";



    @POST(BASE_URL+"user/login")
    Observable<CommonResponseBean<UserBean>> log(@Query("phone") String phone,@Query("pwd") String pwd);


    @POST(BASE_URL+"user/getSmsCode")
    Observable<CommonResponseBean> getSmsCode(@Query("phone") String phone);

    @POST(BASE_URL+"user/register")
    Observable<CommonResponseBean> register(@Body BusInfoBean bean);

    @POST(BASE_URL+"apply/list")
    Observable<CommonResponseBean<PagerBean<ApplyBean>>> applyList(@Query("updateStartTime") String createTime,@Query("updateEndTime") String updateEndTime);


    @POST(BASE_URL+"apply/approval/company/list")
    Observable<CommonResponseBean<List<CompanyBean>>> companyLst();

    @POST(BASE_URL+"apply/enterprise/type/list")
    Observable<CommonResponseBean<List<CompanyTypeBean>>> typeLst(@Query("sign") String sign);

    @POST(BASE_URL+"use/of/pass/add")
    Observable<CommonResponseBean> addPass(@Body PassBean passBean);


    @POST(BASE_URL+"use/of/pass/list")
    Observable<CommonResponseBean<PagerBean<PassBean>>> passList(@Query("useDate") String usedate);


    @POST(BASE_URL+"use/of/pass/count")
    Observable<CommonResponseBean<PassBean>> passCount(@Query("useDate") String usedate);

    @POST(BASE_URL+"apply/count")
    Observable<CommonResponseBean<PassBean>> applyCount(@Query("updateStartTime") String createTime,@Query("updateEndTime") String updateEndTime);

    @POST(BASE_URL+"user/phone/edit")
    Observable<CommonResponseBean> phoneEdit(@Query("phone") String phone,@Query("code") String code);

    @POST(BASE_URL+"user/resetPwd")
    Observable<CommonResponseBean> resetPwd(@Query("phone") String phone,@Query("pwd") String pwd,@Query("code") String code);


    @POST(BASE_URL+"apply/send")
    Observable<CommonResponseBean> applySend(@Body ApplySendBean passBean);

    @GET(BASE_URL+"user/getUserInfo")
    Observable<CommonResponseBean<BusInfoBean>> getUserInfo();

    @POST(BASE_URL+"use/of/pass/edit")
    Observable<CommonResponseBean> detailEdit(@Body PassBean passBean);


    @POST(BASE_URL+"use/of/pass/importData")
    Observable<CommonResponseBean> importData(@Body PassBean passBean);

}

