package com.adealink.weparty.order.datasource.remote

import com.adealink.frame.base.Rlt
import com.adealink.frame.network.data.Res
import com.adealink.weparty.module.order.data.CreateOrderRes
import com.adealink.weparty.module.order.data.OrderDetailData
import com.adealink.weparty.module.order.data.OrderDetailReq
import com.adealink.weparty.module.order.data.OrderPlaymateOpReq
import com.adealink.weparty.module.order.data.PlaymateSubmitEvidenceReq
import com.adealink.weparty.module.order.data.QRCodeOrderDetail
import com.adealink.weparty.module.order.data.QRCodeOrderDetailReq
import com.adealink.weparty.module.order.data.QRCodeOrderPayReq
import com.adealink.weparty.module.order.data.QueryUnCompleteOrderReq
import com.adealink.weparty.module.order.data.QueryUnCompleteOrderRes
import com.adealink.weparty.module.order.data.RefundApplyReq
import com.adealink.weparty.order.data.CancelOrderReq
import com.adealink.weparty.order.data.CompleteOrderReq
import com.adealink.weparty.order.data.CreateOrderReq
import com.adealink.weparty.order.data.EvaluateOrderReq
import com.adealink.weparty.order.data.OrderDiscountData
import com.adealink.weparty.order.data.PlaymateOrderListReq
import com.adealink.weparty.order.data.PlaymateOrderListRes
import com.adealink.weparty.order.data.UserOrderListReq
import com.adealink.weparty.order.data.UserOrderListRes
import retrofit2.http.Body
import retrofit2.http.Core
import retrofit2.http.POST

interface OrderHttpService {

    @Core
    @POST("playmate/order/list")
    suspend fun pullPlaymateOrderList(@Body req: PlaymateOrderListReq): Rlt<Res<PlaymateOrderListRes>>

    @Core
    @POST("skill/order/list")
    suspend fun pullUserOrderList(@Body req: UserOrderListReq): Rlt<Res<UserOrderListRes>>

    @Core
    @POST("skill/order/payment")
    suspend fun createOrder(@Body req: CreateOrderReq): Rlt<Res<CreateOrderRes>>


    /**
     * 用户完成订单
     */
    @Core
    @POST("skill/order/finish")
    suspend fun userCompleteOrder(@Body req: CompleteOrderReq): Rlt<Res<Any>>


    /**
     * 用户取消订单
     */
    @Core
    @POST("skill/order/canecl")
    suspend fun userCancelOrder(@Body req: CancelOrderReq): Rlt<Res<Any>>


    /**
     * 用户评分
     */
    @POST("skill/order/star")
    suspend fun userEvaluate(@Body req: EvaluateOrderReq): Rlt<Res<Any>>


    /**
     * 查询我跟指定用户的未完成订单列表
     */
    @POST("skill/order/unfinishedWith")
    suspend fun queryUnCompleteOrder(@Body req: QueryUnCompleteOrderReq): Rlt<Res<QueryUnCompleteOrderRes>>


    @POST("playmate/order/handler")
    suspend fun playmateOrderOp(@Body req: OrderPlaymateOpReq): Rlt<Res<Any>>


    @POST("skill/order/detail")
    suspend fun orderDetail(@Body req: OrderDetailReq): Rlt<Res<OrderDetailData>>

    /**
     * 用户申请退款
     */
    @Core
    @POST("skill/order/refund/apply")
    suspend fun userRefundApply(@Body req: RefundApplyReq): Rlt<Res<Any>>

    /**
     * 陪玩上传证据
     */
    @POST("playmate/submit/refundVoucher")
    suspend fun playmateSubmitRefundEvidence(@Body req: PlaymateSubmitEvidenceReq): Rlt<Res<Any>>


    @POST("skill/view/order/qrcode")
    suspend fun qrCodeOrderDetail(@Body req: QRCodeOrderDetailReq): Rlt<Res<QRCodeOrderDetail>>

    @POST("skill/order/qr/payment")
    suspend fun qrCodeOrderPay(@Body req: QRCodeOrderPayReq): Rlt<Res<Any>>


    @POST("skill/firstOrder/discount/chance")
    suspend fun orderDiscount(): Rlt<Res<OrderDiscountData>>


}