
package com.tmerclub.cloud.common.order.vo;

import com.tmerclub.cloud.common.order.constant.OrderType;
import com.tmerclub.cloud.common.order.dto.DvyTypeDTO;
import com.tmerclub.cloud.common.order.dto.OrderInvoiceDTO;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 多个店铺订单合并在一起的合并类
 * "/confirm" 使用
 *
 * @author tmerclub
 */
public class ShopCartOrderMergerVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "用户地址")
    private UserAddrVO userAddr;

    @Schema(description = "自提信息Dto")
    private OrderSelfStationVO orderSelfStation;

    @Schema(description = "实际总值", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long actualTotal;

    @Schema(description = "商品总值", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long total;

    @Schema(description = "商品总数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer totalCount;

    @Schema(description = "订单优惠金额(所有店铺优惠金额和使用积分抵现相加)", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long orderReduce;

    @Schema(description = "订单店铺优惠金额(所有店铺优惠金额)", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long orderShopReduce;

    @Schema(description = "用户拥有的积分数量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long userHasScore;

    @Schema(description = "用户使用积分数量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long usableScore;

    @Schema(description = "整个订单可以使用的积分数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long totalUsableScore;

    @Schema(description = "整个订单最多可以使用的积分数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long maxUsableScore;

    @Schema(description = "积分抵扣金额", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long totalScoreAmount;

    @Schema(description = "购物积分抵现比例(x积分抵扣1元）", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long shoppingUseScoreRatio;

    @Schema(description = "等级折扣金额", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long totalLevelAmount;

    @Schema(description = "免运费金额", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long freeTransfee;

    @Schema(description = "总运费", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long totalTransfee;

    @Schema(description = "用户是否选择积分抵现(0不使用 1使用 默认不使用)")
    private Integer isScorePay;

    @Schema(description = "多店铺的商品配送方式")
    private List<DvyTypeDTO> dvyTypes;

    @Schema(description = "用户选择的自提id")
    private Long stationId;

    @Schema(description = "同城配送可用状态 : 1 可用 -1 不在范围内 -2 商家没有配置同城配送信息 -3 起送费不够", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer shopCityStatus;

    @Schema(description = "过滤掉的商品项", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ShopCartItemVO> filterShopItems;

    @Schema(description = "每个店铺的订单信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ShopCartOrderVO> shopCartOrders;

    @Schema(description = "平台订单可以使用的优惠券列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<CouponOrderVO> coupons;

    @Schema(description = "秒杀skuId")
    private Long seckillSkuId;

    @Schema(description = "订单发票")
    private List<OrderInvoiceDTO> orderInvoiceList;

    @Schema(description = "订单类型")
    private OrderType orderType;

    @Schema(description = "预售类型 -1.未开启预售 0.全款预售类型 1.定金预售")
    private Integer preSaleType;

    @Schema(description = "商品类别 0.实物商品 1. 虚拟商品 2.组合商品")
    private Integer mold;

    @Schema(description = "尾款金额")
    private Long balanceAmount;

    @Schema(description = "实际尾款金额")
    private Long actualBalanceAmount;

    @Schema(description = "商品类别 0.实物商品 1. 虚拟商品 2.组合商品")
    private Integer spuMold;

    @Schema(description = "虚拟商品留言备注")
    private List<VirtualRemarkVO> virtualRemarkList;

    @Schema(description = "定金金额")
    private Long totalDepositAmount;

    @Schema(description = "定金优惠金额")
    private Long totalDepositReduceAmount;
    @Schema(description = "所有店铺使用的优惠券列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<CouponOrderVO> shopCoupons;

    private Map<Long, Map<Long, ShopTransFeeVO>> supplierIdWithShopTransFeeMap;
    private Map<Long, ShopTransFeeVO> preSaleTransFeeMap;

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 活动类型 枚举类：OrderActivityType
     */
    private Integer activityType;

    /**
     * 订单状态，秒杀订单独有
     */
    private Integer status;
    /**
     * 订单创建时间，秒杀订单独有
     */
    private Date createTime;
    /**
     * 需要设置主单号的ids
     */
    private Set<Long> needMainOrderIds;

    public Set<Long> getNeedMainOrderIds() {
        return needMainOrderIds;
    }

    public void setNeedMainOrderIds(Set<Long> needMainOrderIds) {
        this.needMainOrderIds = needMainOrderIds;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public UserAddrVO getUserAddr() {
        return userAddr;
    }

    public void setUserAddr(UserAddrVO userAddr) {
        this.userAddr = userAddr;
    }

    public OrderSelfStationVO getOrderSelfStation() {
        return orderSelfStation;
    }

    public void setOrderSelfStation(OrderSelfStationVO orderSelfStation) {
        this.orderSelfStation = orderSelfStation;
    }

    public Long getActualTotal() {
        return actualTotal;
    }

    public void setActualTotal(Long actualTotal) {
        this.actualTotal = actualTotal;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Long getOrderReduce() {
        return orderReduce;
    }

    public void setOrderReduce(Long orderReduce) {
        this.orderReduce = orderReduce;
    }

    public Long getOrderShopReduce() {
        return orderShopReduce;
    }

    public void setOrderShopReduce(Long orderShopReduce) {
        this.orderShopReduce = orderShopReduce;
    }

    public Long getUserHasScore() {
        return userHasScore;
    }

    public void setUserHasScore(Long userHasScore) {
        this.userHasScore = userHasScore;
    }

    public Long getUsableScore() {
        return usableScore;
    }

    public void setUsableScore(Long usableScore) {
        this.usableScore = usableScore;
    }

    public Long getTotalUsableScore() {
        return totalUsableScore;
    }

    public void setTotalUsableScore(Long totalUsableScore) {
        this.totalUsableScore = totalUsableScore;
    }

    public Long getMaxUsableScore() {
        return maxUsableScore;
    }

    public void setMaxUsableScore(Long maxUsableScore) {
        this.maxUsableScore = maxUsableScore;
    }

    public Long getTotalScoreAmount() {
        return totalScoreAmount;
    }

    public void setTotalScoreAmount(Long totalScoreAmount) {
        this.totalScoreAmount = totalScoreAmount;
    }

    public Long getShoppingUseScoreRatio() {
        return shoppingUseScoreRatio;
    }

    public void setShoppingUseScoreRatio(Long shoppingUseScoreRatio) {
        this.shoppingUseScoreRatio = shoppingUseScoreRatio;
    }

    public Long getTotalLevelAmount() {
        return totalLevelAmount;
    }

    public void setTotalLevelAmount(Long totalLevelAmount) {
        this.totalLevelAmount = totalLevelAmount;
    }

    public Long getFreeTransfee() {
        return freeTransfee;
    }

    public void setFreeTransfee(Long freeTransfee) {
        this.freeTransfee = freeTransfee;
    }

    public Long getTotalTransfee() {
        return totalTransfee;
    }

    public void setTotalTransfee(Long totalTransfee) {
        this.totalTransfee = totalTransfee;
    }

    public Integer getIsScorePay() {
        return isScorePay;
    }

    public void setIsScorePay(Integer isScorePay) {
        this.isScorePay = isScorePay;
    }

    public Long getStationId() {
        return stationId;
    }

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public Integer getShopCityStatus() {
        return shopCityStatus;
    }

    public void setShopCityStatus(Integer shopCityStatus) {
        this.shopCityStatus = shopCityStatus;
    }

    public List<ShopCartItemVO> getFilterShopItems() {
        return filterShopItems;
    }

    public void setFilterShopItems(List<ShopCartItemVO> filterShopItems) {
        this.filterShopItems = filterShopItems;
    }

    public List<ShopCartOrderVO> getShopCartOrders() {
        return shopCartOrders;
    }

    public void setShopCartOrders(List<ShopCartOrderVO> shopCartOrders) {
        this.shopCartOrders = shopCartOrders;
    }

    public List<CouponOrderVO> getCoupons() {
        return coupons;
    }

    public void setCoupons(List<CouponOrderVO> coupons) {
        this.coupons = coupons;
    }

    public Long getSeckillSkuId() {
        return seckillSkuId;
    }

    public void setSeckillSkuId(Long seckillSkuId) {
        this.seckillSkuId = seckillSkuId;
    }

    public List<OrderInvoiceDTO> getOrderInvoiceList() {
        return orderInvoiceList;
    }

    public void setOrderInvoiceList(List<OrderInvoiceDTO> orderInvoiceList) {
        this.orderInvoiceList = orderInvoiceList;
    }

    public OrderType getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderType orderType) {
        this.orderType = orderType;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Integer getMold() {
        return mold;
    }

    public void setMold(Integer mold) {
        this.mold = mold;
    }

    public Long getBalanceAmount() {
        return balanceAmount;
    }

    public void setBalanceAmount(Long balanceAmount) {
        this.balanceAmount = balanceAmount;
    }

    public Long getActualBalanceAmount() {
        return actualBalanceAmount;
    }

    public void setActualBalanceAmount(Long actualBalanceAmount) {
        this.actualBalanceAmount = actualBalanceAmount;
    }

    public Integer getSpuMold() {
        return spuMold;
    }

    public void setSpuMold(Integer spuMold) {
        this.spuMold = spuMold;
    }

    public List<VirtualRemarkVO> getVirtualRemarkList() {
        return virtualRemarkList;
    }

    public void setVirtualRemarkList(List<VirtualRemarkVO> virtualRemarkList) {
        this.virtualRemarkList = virtualRemarkList;
    }

    public Long getTotalDepositAmount() {
        return totalDepositAmount;
    }

    public void setTotalDepositAmount(Long totalDepositAmount) {
        this.totalDepositAmount = totalDepositAmount;
    }

    public Long getTotalDepositReduceAmount() {
        return totalDepositReduceAmount;
    }

    public void setTotalDepositReduceAmount(Long totalDepositReduceAmount) {
        this.totalDepositReduceAmount = totalDepositReduceAmount;
    }

    public List<CouponOrderVO> getShopCoupons() {
        return shopCoupons;
    }

    public void setShopCoupons(List<CouponOrderVO> shopCoupons) {
        this.shopCoupons = shopCoupons;
    }

    public Map<Long, Map<Long, ShopTransFeeVO>> getSupplierIdWithShopTransFeeMap() {
        return supplierIdWithShopTransFeeMap;
    }

    public void setSupplierIdWithShopTransFeeMap(Map<Long, Map<Long, ShopTransFeeVO>> supplierIdWithShopTransFeeMap) {
        this.supplierIdWithShopTransFeeMap = supplierIdWithShopTransFeeMap;
    }

    public Map<Long, ShopTransFeeVO> getPreSaleTransFeeMap() {
        return preSaleTransFeeMap;
    }

    public void setPreSaleTransFeeMap(Map<Long, ShopTransFeeVO> preSaleTransFeeMap) {
        this.preSaleTransFeeMap = preSaleTransFeeMap;
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public Integer getActivityType() {
        return activityType;
    }

    public void setActivityType(Integer activityType) {
        this.activityType = activityType;
    }


    public List<DvyTypeDTO> getDvyTypes() {
        return dvyTypes;
    }

    public void setDvyTypes(List<DvyTypeDTO> dvyTypes) {
        this.dvyTypes = dvyTypes;
    }

    @Override
    public String toString() {
        return "ShopCartOrderMergerVO{" +
                "userId=" + userId +
                ", userAddr=" + userAddr +
                ", orderSelfStation=" + orderSelfStation +
                ", actualTotal=" + actualTotal +
                ", total=" + total +
                ", totalCount=" + totalCount +
                ", orderReduce=" + orderReduce +
                ", orderShopReduce=" + orderShopReduce +
                ", userHasScore=" + userHasScore +
                ", usableScore=" + usableScore +
                ", totalUsableScore=" + totalUsableScore +
                ", maxUsableScore=" + maxUsableScore +
                ", totalScoreAmount=" + totalScoreAmount +
                ", shoppingUseScoreRatio=" + shoppingUseScoreRatio +
                ", totalLevelAmount=" + totalLevelAmount +
                ", freeTransfee=" + freeTransfee +
                ", totalTransfee=" + totalTransfee +
                ", isScorePay=" + isScorePay +
                ", dvyTypes=" + dvyTypes +
                ", stationId=" + stationId +
                ", shopCityStatus=" + shopCityStatus +
                ", filterShopItems=" + filterShopItems +
                ", shopCartOrders=" + shopCartOrders +
                ", coupons=" + coupons +
                ", seckillSkuId=" + seckillSkuId +
                ", orderInvoiceList=" + orderInvoiceList +
                ", orderType=" + orderType +
                ", preSaleType=" + preSaleType +
                ", mold=" + mold +
                ", balanceAmount=" + balanceAmount +
                ", actualBalanceAmount=" + actualBalanceAmount +
                ", spuMold=" + spuMold +
                ", virtualRemarkList=" + virtualRemarkList +
                ", totalDepositAmount=" + totalDepositAmount +
                ", totalDepositReduceAmount=" + totalDepositReduceAmount +
                ", shopCoupons=" + shopCoupons +
                ", supplierIdWithShopTransFeeMap=" + supplierIdWithShopTransFeeMap +
                ", preSaleTransFeeMap=" + preSaleTransFeeMap +
                ", activityId=" + activityId +
                ", activityType=" + activityType +
                ", status=" + status +
                ", createTime=" + createTime +
                '}';
    }
}
