package com.quyunshuo.module.home.interfaces

import com.quyunshuo.androidbaseframemvvm.common.bean.ProductDataBean
import com.quyunshuo.androidbaseframemvvm.common.bean.ShoppingCartBean

/**
 * 购物车接口
 */
interface IShoppingTrolley {
    //加入购物车
    fun shoppingTrolleyAdd(productDataBean: ProductDataBean):Boolean

    //删除购物车
    fun shoppingTrolleyRemove(position: Int)

    //清空购物车
    fun shoppingTrolleyRemoveAll()

    //计算购物车的金额
    fun shoppingTrolleySumPrice(): Double

    //计算购物车的数量
    fun shoppingTrolleySumCount(): Int

    //计算购物车，折扣后的金额。
    fun shoppingTrolleyDiscountSumPrice(): Double

    //获取到购物车里面的所有内容
    fun getShoppingTrolleyList():List<ShoppingCartBean>

    //获取购物车里面的内容
//    fun getShoppingTrolleyById(position:Int):ShoppingCartBean?

    //修改商品数量
    fun shoppingTrolleyUpdateCount(count:Int,position: Int):Boolean

}